I had sex 2 times unprotected. The first time was 2 days before my period and then 4 days after my period. Can I be pregnant? I have cramps now..

Unlikely . What you describe is actually practiced by many women as "natural family planning". The idea is to avoid the fertile period around ovulation. It works if you have perfect predictable cycles, if sperm don't survive over 72 hours, and if you make no exceptions. Unfortunately, ovulation can be sporadic, skipped, or induced...Making this method unreliable. Check a upt if you miss a cycle & good luck.
Not likely. If you had sex then had your period, you can't be pregnant. If you had sex four days after your period, you can't be pregnant. If you don't chose to be pregnant, please use birth control of some form.