Pains during sex

Hi,

I've been experiencing these really sharp pains in my uterus during and after sex, the last time it happened I ended up crying cause it was so bad. I've tried taking pain meds but they're no helping . What could it be and how can I go back to enjoying sex without pains ?😭😭😩