To avoid contracting gonorrhea, you can take several effective steps. 

While the only way to completely avoid infection is to not have sex, you can significantly reduce your risk by following these methods: 

Consistent and Correct Condom Use: Use a new latex or polyurethane condom every time you have vaginal, anal, or oral sex. When used correctly, condoms offer more than 90% protection against gonorrhea.

Regular Testing and Screening: Get tested annually for STIs if you are sexually active. Doctors specifically recommends annual screening for sexually active women under 25 and gay or bisexual men.

Mutual Monogamy: Stay in a long-term relationship with one partner who has been tested and is known to be uninfected.

Limiting Sexual Partners: Reducing the number of people you have sex with directly lowers your overall risk of exposure to the bacteria.

Using Dental Dams: For oral-vaginal or oral-anal contact, use a dental dam to prevent transmission through the mouth or throat.

Avoid Sharing Unwashed Sex Toys: Bacteria can live on sex toys. If sharing, wash them thoroughly between uses or cover them with a new condom each time a different person uses them.

Pre-Exposure Prophylaxis : For individuals at higher risk (such as men who have sex with men or transgender women), a healthcare provider may prescribe medicines within 72 hours of unprotected sex to significantly lower the risk of infection. 

It is also vital to avoid sexual contact with anyone showing symptoms like unusual discharge or pain during urination.