Getting STs from external surfaces is not a common thing. But if you were in touch with secretions there was a theoretical risk of gonorrhea and chlamydia. If the other person had any chancre, there would be also a risk of syphilis, and if blisters were present, there would have also been a risk of herpes.
You can test as follows:
-3 weeks after the exposure, for gonorrhea and chlamydia.
-6 weeks after the exposure, for syphilis, and if the result is negative, repeat i 3 months after the exposure, as there are people that take longer to show a positive result when infected.
-3 months after the exposure, for herpes.
All the best.