HairedYouOut
First, it should go without saying, but I'm not a doctor. I'm just a random internet stranger offering pointers. Consider that anything I say may be wrong. Do your own research, and talk with a real doctor.
That being said, there's minoxidil[1], although it doesn't require a prescription. The original commercial name is Rogaine. It's a foam you apply twice a day. As I've heard, you'd lose all your hair in the first 6 months, and then it would regrow fuller. You'd have to apply it for life. If you stop, then you would go back to the amount of hair you had before taking it.
You may evaluate differently, but personally I don't think it's worth it. It's not a trivial expense, not easily available worldwide, and seems too bothersome.
Another medication is finasteride-1mg[2], many times sold under the brand names Propecia/Proscar. It's a pill taken daily. AFAIK, it only works to prevent further baldness and not to restore hair that's already been lost. It may or may not require a prescription depending on where you are, but you should check with a doctor to see if they think it'll work for you. Not all forms of baldness are the same. The 1mg version can be expensive, so I hear some people buy the much cheaper 5mg version and cut that in quarters for 1.25mg doses. A potential side-effect is possibly irreversible ED. You should evaluate on your own if the risk is low enough to be disregarded.
[1] https://en.wikipedia.org/wiki/Minoxidil#Hair_growth
[2] https://en.wikipedia.org/wiki/Finasteride#Scalp_hair_loss