Urinary infection

I was having sex with my bf like 3 days ago and since that i got urinary infection! it was our first time without condom and he did cum inside me. I don’t know what to do to stop this urinary infection specially because i can’t go to the doctor. can somebody please give me some healing tips? and is urinary infection caused by sex something common?! and if so, how can I avoid it?