PTSD from sex🥺

Last time I had sex(Which was my first time ever), I got a UTI And kidney infection, and I am nervous it will happen again. Is there any ways I can prevent this from happening again(besides peeing after sex cuz it didn’t work for me) and is it more likely to get a uti when u have had one from your first time before? Or is it less likely since it’s not my first time I have had sex?