8 weeks pregnant -wtf

I have been spotting for 3 weeks (brown spotting) I went to the doctors about it and they checked my cervix and it is closed and baby has strong heartbeat 160bpm. This just came out of me....