Ways to prevent UTI’s

So, I went in before my appt. to give a urine sample because I believed I had a UTI. Which, turned out to be correct. I hadn’t knowingly had a UTI since I was a child, but I just could tell something was off. My obgyn put me on an antibiotic. What are the best ways to prevent future UTI’s?