This is completely normal and nothing to be worried about. This is kind of anxiety issue only even if you have been erect several times but during the actual act it becomes difficult to maintain an erection. It specially happenes when you are performing for the first time. As you have mentioned in your post that you are a virgin so this is completely normal and nothing to worry about. There has to be mutual understanding and support between the partners and this issue can ve overcome easily.
Next Steps
medicine is advisable if the issue continues along with a colour dopler of penis.
Health Tips
when doing for the first time try to reduce the fore play and reach sex directly while the penis is erect. use lubricants as it is quite painful for the female partner without foreplay.