Pulling a penis out of a vagina or anus before ejaculation (coming) doesn’t help prevent STIs (sexually transmitted infections) because many bacteria and viruses don’t depend on ejaculation to pass from person to person. Many can be passed through pre-cum, vaginal fluids, anal fluids or skin to skin contact.
We’d recommend STI testing for both of you. Once you both know your status, you get any infections treated and cleared up if necessary, and move on. Condomless sex with an uninfected partner won’t transmit STIs (as long as neither of you is having condomless sex with other people.)
Pulling out is not a fail proof method of birth control. Consider your plans around pregnancy and what birth control methods will work best for you.
As for peeing after sex, it won’t prevent sexually transmitted infections. Peeing can sometimes help clean the urethra and prevent urinary tract infections though, so we wouldn’t tell you not to pee after sex.