How long for a miscarriage to happen ?

Ch

This morning I started bleeding bright red blood.i went to my doctor and baby was alive with heartbeat and moving.so she told me to take progesterone and not to move for two days only for bathroom..she said it isn’t sure yet and might be a blood pocket...

If it is a miscarriage should the cramping start immediately or I could be bleeding for days before it happens? Thank you...I really pray for my rainbow baby :(