Hi there ~
I understand your concerns. While you may have phimosis
which should be treated surgically, and is one of your primary concerns, it will not help to have unsafe sex if you have this condition and you need to see a doctor especially a surgeon to have yourself circumcised. It will help maintain better genital hygiene and you will experience relief after getting treatment for the infection in your Urinary Tract
(UTI). I believe antibiotics will be helpful. I hope this helps.
Take care and have a lovely day!