Muscus plug without pregnancy?

Hi guys. So today I passed a mucus plug (I'm 100% positive bc I pulled it directly out of my cervix) and so I took a pregnancy test and it was negative. Now I'm having severe cramping and back pain.

Has this ever happened to anyone else? Did I have a miscarriage or can hormonal BC cause a mucus plug?

Can miscarriages happen with negative tests?

I haven't had my period in almost 5 years so I'm not really sure how my body works. 😂