It can be very difficult for teenagers to gain access to STI testing and treatment. It just means you need to be in a place in life where you can get routine STI testing - men who have sex with men should be tested for HIV and other STIs every 3-6 months, minimum. That fact doesn’t mean you shouldn’t have sex (more on that later).
Men who have sex with men and transgender women are most at risk for HIV, and have high rates for other sexually transmitted infections too. So if you’re in the closet and don’t feel safe coming out to your parents and talking to them about your sex life, wait. In the United States, patient privacy laws like HIPPA only apply at legal age.
This is a fact queer youth have to face: teenagers under the age of 18 do not have any legal ability to hide their medical history from their parents.