It's generally well tolerated. It only really works for male pattern baldness related to DHT, not all baldness. The earlier you start it the better, same with minoxidil (topical or oral).
Regarding side effects, as someone that wants to have kids still, I'm avoiding it. The risk is low, but there have been documented cases of impotence that has been very long lasting. If you're experiencing balding, I would probably start on minoxidil first. Can also do other stuff, like micro needling, PRP/PRF injections, and take certain supplements like Nutrafol, Viviscal, Untangled, Xtresse, etc.
To be honest, a lot of people lose hair for lots of reasons. It's reasonable to try the OTC stuff first, and give it 3-6 months, as well as some of the basic prescription stuff from your primary care. Maybe get some labs from your primary care physician as well. But if that doesn't work after 3-6 months, then best bet is to see a dermatologist.
ETA: Finasteride is also good for slowing prostate enlargement. So another benefit for your future self, if you choose to take it. Some people take low dose finasteride a few times a week just for that.