Pain during sex

Lately when me and my boyfriend try to have sex, it hurts. I know I don't have a uti and it doesn't matter how wet I am it feels like it just doesn't fit anymore. But then on other occasions everything's fine