Why does it hurt when I try to have sex?

Me and my guy tried to have sex last night it was super painful. I lost my v to him and we only had sex a few times. Is it possible that if I don't have sex for a while I would have to start all over with the pain? I feel so bad and I get really insecure. He's very supportive but on the inside I feel like I'm not doing it right or maybe I'm thinking too much. I know that I have to be wet but like how wet should I be so that It can be easier to take? It gets really frustrating especially when I want it!!Any tips?