Bleeding after miscarriage

Maddie • Mama of a beautiful boy & angel twin boys💙👶👼👼🤍👼 Still trying for baby #2🌈🤍

I had a spontaneous miscarriage at 9 weeks about 3.5 weeks ago. My bleeding seemed like it stopped a few days ago, it started tapering off and then I had no bleeding for 2 days. My husband and I decided to have sex and then the very next day I started bleeding again, to the point whenever I go to the bathroom there is blood in the toilet. Today is the second day I’ve been bleeding now. Could this still be from the miscarriage or could sex have caused this bleeding?