I can’t finish

I masturbate quite a lot but for some reason I get to this point where it feels really good, and my legs shake, my breathing is really heavy, and it’s just really nice, but that only lasts like 5 secs and then it sort of hurts...I don’t know why and I’ve never been able to cum...can someone help me