Period cramps

Today i had the worst cramps of my intire life... i felt nauseous and i had diarrhea what can help to prevent bad cramps like this in the future besides taking birth control also i took over the counter medication and a heating pad it didn’t work until i prayed and finally went to sleep. Thanks!