Painful sex?

Me and my boyfriend have been together for 3 years and have never had any problems during sex, until about 6 months ago.

Now whenever we have sex I get this sharp pain slightly to the right on my belly, at first I could just ignore this pain but it’s gotten so bad recently that now when I get it I can’t help but scream and cry in pain and last time it occurred my legs violently shook for a few minutes until the pain calmed down. We have gotten very close to calling an ambulance before due to my bodies reactions to the pain.

Extra note: I also suffer from extremely irregular periods, always have done, I have a bit of a track record at the drs for appointments about irregular bleeding.

Has anyone else suffered this kind of pain? My biggest fear is endometriosis, or is there another explanation?