Tanks for using HCM!
You have to do some investigations to come to some conclusion.
You haven't mentioned your age, also, whether your UTI in past was diagnosed, with which investigations.
Now, you should do Urine culture & sensitivity, Renal Function Tests,
Sr. Uric Acid, CBC, Ultrasound
KUB & X-ray KUB.
Further management depends on these investigations,
Consult your Urologist
with the reports.
Till then you may take, with your doctor's opinion, antispasmodics, analgesics, tamsulosin
& diuretics (if required), antibiotics (as per reports).
Drink plenty of water throughout day, approx. 2-3 litres/day.
Hope this explanation is satisfactory for you.
Wish you a healthy life ahead.