Thanks for reaching out to EmpowHER!
For a pregnancy to occur, actual intercourse has to happen. What you have described above is considered outercourse and does not cause pregnancy.
It's very possible that your stress and nerves are affecting your period and causing you to have cramps. I recommend you check out this article which is a great resource and describes outercourse and common myths around it: https://www.empowher.com/community/share/outercourse-dry-humping-dry-sex...
I think it will help ease your fears around pregnancy. Let me know if you have any other questions!