Sex and cumming

So me and boyfriend have been having sex lately and he can’t cum when we are having sex but will cum when he’s jerking off. I don’t know if I’m doing anything wrong or if something is wrong with him I need advice please