Went to an ultrasound & was told baby had no heart beat ?

I went to an ultrasound today Bc I had been having some light spotting and today I was told they couldn’t find a heart beat and the baby was measuring 3 weeks behind what it should have been at .. how is it possible