Miscarriage or normal?

I’m 2 weeks past what I THOUGHT was my period. It was a normal period. Then yesterday I took a test because I felt “off” and it was a BLAZING positive line that popped up within a second.

Today I was having very slight cramping (period like but not as bad) and some brown and red spotting. So I went to the ER and they confirmed I was pregnant with my HCG being 541. They did ultrasounds and said they couldn’t see anything in my uterus but that it could still be too early or my “period” was actually the miscarriage. Has anyone had this happen and went on to have a healthy pregnancy or am I losing/lost my baby?