Just in case you didn't use a condom.
But first there are things to consider.
You should never panic. According to the US Centre for Disease Control and Prevention, risk of infection after one bout of unprotected sex depends on whether your immune system is busy fighting off a cold; or whether you have microabrasions on your vagina, penis, anus, mouth, or other areas that have skin-to-skin contact or exposure to fluids. So you may get off scot free.
Women should pee within 30 minutes
This is done to reduce risk of a urinary tract infection. The urine cleans out the urethra and sweeps all the bacteria along with it.
Women should take an emergency contraceptive
This should be done within 72 hours of unprotected sex.
Take post-exposure prophylaxis (PEP)
If you think there is a chance you’ve been exposed to HIV, you should alert your doctor who may prescribe a PEP.
Check to make sure your genitalia looks ordinary
For women, you should check for unusual discharge in terms of volume, texture, colour, smell, itchiness, and pain.
Infections like UTIs, yeast infections, bacterial vaginosis can cause symptoms within 24h to a week of unprotected sex.
For men, you should check for burning sensations when you pee, swollen testicles, penile discharge etc. These may appear within a week or multiple weeks after having unprotected sex and could be symptoms of chlamydia, gonorrhoea.
Should any of these signs appear, seek medical advice immediately.
Take an STI test after two weeks
Women should take an emergency pregnancy test and get an STI screening.
Take more tests after six weeks-6 months
If the tests came out negative, you should take more tests to confirm the negative status after a month then after three month intervals as STIs like HIV and Human Papilloma Virus (HPV) release antibodies after 3 months. So can only be detected after three months.