How is testosterone ok for your body?

Hello lovely community.

This is actually more of a gym question and I might post the same thing in a gym subreddit forum.

You know how doctors prescribe testosterone to female who like to transition to become male? How harmful or dangerous is that? Clearly once you start the journey you will have to take testosterone for life.

You know how in the gym community when someone is "not natty" basically means not natural, they take illegal performance enhancing drugs. A lot of times it's testosterone in different forms and you normally won't get it legally.

I wonder if type of testosterone is different. I'm a regular gym goer and sometimes wonder if a higher testosterone level would improve my results. But my health is more important than achieving an ideal physique and I know I'd never inject myself. On the other hand then I think how trans people get testosterone prescribed and I wonder if that could technically help with muscle and hair growth, getting a better jawline etc.

I always wondered....

Any insights would help. Thank you :) have a lovely day