Have had the same problem with my now-wife, nearly 20 years ago. Pretty fun to remember.
As this is an old question, I’d simply love to spill some advice for future readers:
Firstly, some notes: my wife wasn’t a virgin at the time of our first sexual intercourse. I wasn’t too, but my first and last (to that moment) actual sex was 3 years prior to that with a prostitute: even though I managed to “insert” in her, I’ve lost full erection and was aroused to around 50% (men know what I’m talking about). Basically, that was a huge waste of money: no finishing, no enjoyment. Also, actual frictions were pretty painful to me.
So, how did I finally manage to have sex with my wife? Practice, lube and some major foreplay.
Even though I still managed to lose full erection because of stress of me not being able to penetrate, the problem was not in me, but in her: it was literally too tight to get in.
It could be a case of vaginismus, but most likely, if your partner has already had successful sex before, it’s a problem with relaxing. We’ve only managed to have normal sex on the second try. 30 minutes of foreplay, kissing everywhere back and forth and most importantly: lube.
To all young men who are reading this: please, don’t start harassing yourself or your partner over this. Sex is very closely-knit with your psyche. If you’re stressed, tired or ill, then perfectly healthy young men experience loss of erection, even though your woman arouses you like crazy! I’ve also read about some cases called “Syndrome of future sexual failure” (or smth like this) when men expect their first time to be a potential failure, stress over it too much and of course, fail when it comes to it.
If you’ve got perfect erection and are ready for sex but still can’t put it in - the problem is with your partner. To combat it, you can yet again: make everything more relaxing than last time, massage her or start with oral sex (69 is a perfect final touch in good foreplay). If she had sex before, and after all the aforementioned step she’s still tight and it’s not vaginismus, then it means that you can’t make her feel relaxed and she probably doesn’t trust you enough.