Today, just to stall your hair-loss / keep hair, you'll need to be on minoxidil (foam / liquid, twice a day) and finasteride and/or dutasteride (pill). Though many will use more products - and as of lately, microneedling your scalp has gained popularity.
Some of these meds have adverse health effects, but in the end - they can be expensive and time-consuming, and results range from poor/no effect, to good.
A hair-transplant could cost you between $10k-$50k, depending on where you get one. Musk has had a HT, but probably needs to stay on the meds mentioned above, to halt any other loss that's going on.
Long story short: The current solutions are expensive and time consuming. It becomes a lifestyle / daily routine, like with other chronic illnesses. And the effects can disappear if/when you can no longer afford them.