Thanks for writing your query.
Due to anatomical structure, females are more prone to Urinary Tract Infection
If you are having recurrent UTI, you are taking antibiotic which is not completely sensitive to the infection, so you should get culture and senstivity test of urine. This will help in knowing the appropiate antibiotic suitable for your infection.
Continue taking precautions you have mentioned. Take advice from Urologist
if the problem persists.
I hope this is helpful to you.