Once you can communicate when, where and how the pain occurs, you can start working on addressing it. Try lube. Try more foreplay. Try warming up with a sex toy. Change your sex position. If these remedies don’t work for you, you may want to bring your assessments to your doctor.
And, as you work on sorting this out, remember that penetrative sex isn't the only kind worth having. Affection stirs up oxytocin. Oxytocin is a major, major component in bonding with a partner.
I always say to people, “Even if you’re in a place where you can’t have explicit sex play together, please just keep holding hands and petting each other and cuddling and snuggling and touching and all of those things because that’s how the body builds oxytocin and oxytocin is what keeps us bonded to our partners.”
Finally, be kind to yourself. I’ve met people who've had painful penetration their entire lives because no one told them that it wasn’t supposed to be painful. I’m here to tell you, it's not supposed to be painful.
Now that you know, also know that it isn't your fault and that there are many things you can do to address the problem.