Miscarriage or lining/blood clot?

Caitlin

I had this just coke out I ended my period a few days ago but also had sex 2 weeks and a month before my period so I’m trying to figure out if it’s a possibly miscarriage or just a blood clot or lining that got stuck