Pain on top

Last night I lost my virginity and at first I was on top. We wasn’t go fast at this point but as I was riding him it hurt a little bit so I stopped with his still inside me. He then started thrusting in side me and it felt so good there was no pain at all. Do you think it hurt because it was my first time doing it or what?