Sex for the first time in 3 years!!!

I’ve only had sex twice and it’s been three years since I’ve don’t anything sexual. My partner and I tried to have sex and it just wouldn’t go in. It made me feel like a failure and totally killed the mood. I’m pretty sure if we are able to ever get it in it’ll hurt, like I’m losing my V card all over again. Any advice to lessen the pain and allow my body to fully relax??