Can you get UTI after sex?

Can you get them if you don’t pee after sex but your partner had a condom on?