Could I still get uti from using a condom during sex?

I recently got uti after me and my boyfriend had unprotected sex and I just want to avoid getting it again.