I started my period yesterday and lastnight I started having these pains that felt like contraction and I was 8 days late and took a test 2 days ago +?

Unlikely. Best to do home pregnancy test on first morning urine no sooner that 2-3 weeks after first unprotected sex. If negative, repeat in 7-10 days. If both neg, unlikely you are pregnant. Pains can be increased cramping over normal as there may be some additional uterine lining to be passed. Can use Advil, Aleve (naproxen) for cramps as well as heating pad. If no better in 3 days, see your doctor. Best of luck.