What do I do?

I’m with this guy, and it has come to the point of a sexual relationship, (my first one)

We were in the moment everything in place, then he losses his boner, so we get it back again, and he kept losing it each time we tried.

It was my first time and his, so I’m so lost on how to feel and what to do...

he also told me he loved me, before this happened