Sex not pleasurable

I've had sex multiple times with my boyfriend (first for both) and everytime it's either hurts or its not pleasurable. We use lube cause the one time we didn't I got a UTI and it also hurt like hell. How do I make sex feel better?