Welcome to HCM
your history tells that you have got a injury
Yes there is chances of acquiring infection as the urinary orifice is very close by.
Give time to heal by avoiding excess friction in the injured area.
Do visit a gynecologist to examine whether the tear is a minor one or is extended.
For prevention: intercourse should always precede adequate lubrication, natural or artificial.
all the best.