Is this a miscarriage?

I literally just had to pull this out. I wiped a couple of times and it wasn’t coming out so I had to tug on it. I’ve had a miscarriage be

fore but nothing like this. I had really bad cramps before I went

to sleep. At first I was scared but now I don’t know what to do.