Having a hard time finishing😡

So today was my 5th time having sex, and the guy I was doing it with was a virgin, and he finished first. We decided to go a second time to try to get me off, and we ended up going at it for two hours. We tried almost every position, doggy, missionary, riding, and every time I got close, it would start to hurt or the climax would go away. Does anyone else have this problem and if so, how do you fix it?