So confused

Carolina

Hello so I had my period around June 20 till June 25th then July 7 I was spotting brown till July 10th so I was supposed to start my period on July 25th but dat day I was spotting brown for few hours then it went away so right now I’m 18 days late (BTW I HAVEN’t had sex since February) so I can’t be pregnant I’m just really confused why was I spotting I’m really worried about my period I be feeling lower back pain light cramps