unsure

so last night i was having sex with my boyfriend and we were doing the deed and we started doing an@l and it kind of hurt so he put it back into my pussy and came inside me like normal (i’m on bc) and is there anyway i could get a uti or something bc we switched?