My understanding is it is hormonal and governed by androgens, testosterone, and DHT. Depending on a man’s levels and how sensitive their follicles are, it will affect how their scalp or beard grows. It can also be genetic/inherited and they are more likely to bald as they get older. Medication is usually aimed at hormonal causes and combined with something like minoxidil, which is a vasodilator.
Women also go through something similar, except the beard part for most women.
Have you looked at CeraVe in the tub?