Being on top is usually the only way for me to orgasm,but if I sit straight up it hurts like hell.
I find that if you lean forward just a little bit,not enough to be lying on his chest it makes the pain disappear.I usually link my fingers in with my bfs to hold myself in the right position.
I'm not sure why it hurts,or really what's causing the pain.
It's not just because it is the first time on top,you just need to play around with positioning.Just tell your bf to go slow and let you find your own position.There's no set technique for being on top,like any position in sex,whatever feels good for you and your partner.
Hope this helps,and good luck!