Unable to have penetrative sex

Hi,
I have been with my partner for six years now. She was against having sex for the first two years. But we used to have foreplay and enjoyed it thoroughly. Used to get hard and not even worry about that.
But one day in the middle of a foreplay she says that she is ready to have sex and me fully excited tries to penetrate but wasn’t sure where to actually. Neither does she as both us are virgins and had not much knowledge.
I panic and I lose my erection. Ever since then I fail to get erection as I keep worrying that if it’s hard enough to penetrate.
I tried multiple times post that when I was able to get hard somehow but still could not penetrate.

Now, Whenever We tried to have sex I get anxious and not even enjoy the foreplay as I used to.
And I am not getting excited by partner anymore as all I think of is about my erection when we try to get intimate.
Any suggestions?