Help please

I've been spotting brown ever since my period ended on the 14th yesterday I had bad cramps on my right lower side.

The spotting varied from kind of heavy to very light.

Should I take a test could pregnancy be a possibility? I did have unprotected sex on my period and after it ended.

Please any feedback would be greatly appreciated.