Avoiding hair loss

I was just looking at picture of my moms family the other day, and I was noticing that almost all the men in my moms family are bald. I don’t want to end up that way. I am only 17 now, but I was thinking that maybe if I do something about it now, like start taking some kind of hair growth pills that I might be able to escape hair loss. I just don’t want to look like all the other men in my family. I want to feel like I am good looking all the way until I die.