Did I have a miscarriage?

So I need some help. The other day when I woke up, I had to go to the bathroom (like every morning) to pee. After I was done I realized there was a little red pea sized bead-like thing. I haven’t been bleeding but prior to that I had really bad cramps. I’m not supposed to start my period until Tuesday. And I’m not sure what exactly it was. Please help!!