Olhos, hello there and I'm so sorry to hear of your troubles.
I am going to be very direct for your safety, so please don't be offended.
The first things that come to my mind are that one or more of the following may apply to your ex-boyfriend :
1) either he may have been having sex with you in a way that is giving you repeated infections (i.e., he hasn't showered well or soaped off thoroughly, or perhaps he is contaminating you with urine or faeces by bringing those from other areas or his own skin, to your groin region).
2) or, maybe just as likely, he may have picked up a yeast infection or some other bacterial infection (&/or perhaps also an STD), and your body is having some reaction to the exposure. Bacterial infections can be treated w/antibiotics but to varying degrees of success...some strains are becoming more resistant.
3) or, perhaps he has given you a virus which lives in or around the genital tract, and has migrated to your urinary tract, causing infection there. You cannot treat viruses with an antibiotic. For example, herpes or AIDS. Among men in general (and even more so among uncircumcised men), unseen bacteria and viruses tend to live in and around the head of the penis and within the folds of the foreskin, in addition to viruses being present in the semen.
Remember that often men may have few or no symptoms of yeast, of some bacterial infections, or even of some STDs. Also they recommend always urinate after sex but this helps only if you are not being exposed to any of the above.
I would right away get checked for STDs and if you are still in contact, IMO you should also inform your ex-boyfriend that he needs to get a thorough check for STDs, including viruses like genital herpes (or AIDS of course), before he touches you again. Even if it's only yeast, he will continue to re-infect you if you have unprotected sex or mouth-to-genital contact (for example, if he has herpes simplex [cold sores] inside or on his mouth, and his mouth makes contact with your groin area -- this can give you genital herpes -- but if your body fights it, you may get some other non-specific infection). Moreover, UTIs require medical intervention and can lead to more serious things (kidney infection or even sepsis) if untreated or persistent (as many of them are becoming fairly to severely drug-resistant -- a real problem especially in some women).
Long story short, yes, your body is having a reaction. He is infecting you through some means. This is a warning to never have unprotected sex with someone who isn't trustworthy and who isn't willing to refrain from sex whilst you're ill. And who isn't willing to behave, be monogamous, go to the doctor and get tested & treated, stay on his treatments as needed....and then once you're well, to wear a condom and go very gently with you till you till you get this sorted. Including keeping his condom for months if he's infected &/or has not been monogamous. He may have done what he liked whilst you were apart the past few weeks or months, but that doesn't mean you have to put your health at risk. There are consequences, and if he doesn't like the condom then too bad...your health is always more important and he always has the choice to be monogamous and commit (both to you
and also to any treatment programme he may require), if he wants to have unprotected sex.
TBH, it may simply be he's too rough with you during sex, but then again, you may be taking your life in your hands, if he is out and about, having unprotected sex with you and possibly others, whilst you continue to repeatedly get genital & urinary tract infections after having sex. Please stay safe and protect yourself.
Peace & blessings
7L