Pregnant test

I didn’t come on my period yet so can I get a pregnant test now I’m Having cramps because I’m scared