It's most likely due to DHT. If you happen to be taking testosterone supplementation, your DHT will elevate, and it causes hair loss. Whether on testosterone or not, you can take a DHT blocker (i.e. propecia), which will help stop hair loss, but you'll be married to it, meaning that if you stop it, the hair loss resumes, and those meds have their own side effects to consider. Talk to your doc.

Or just shave your head like me.