heartbeat. You are hearing the amplified "beat frequency" generated by the interaction between the outgoing ultrasound signal, and the returning ultrasound signal. When the outgoing signal is reflected back by a moving object (fetal heart), then the returning signal has a slightly higher frequency (if the object is moving toward the transducer), or slightly lower frequency (if the object is moving away). This is called the Doppler shift. Every so often, the peaks and valleys of these slightly different frequencies are superimposed on each other, creating a much louder sound, that happens to be in the audible range. It is this sound that you are hearing."
Also:
"Although the fetal heart begins beating as early as the 5th week after the LMP, your ability to detect it will be limited by your equipment.
An ultrasound machine usually will enable you to see a heartbeat by 5 to 6 weeks gestation if equipped with a vaginal probe. Abdominal ultrasound will usually see the heartbeat by the 7th-8th week of pregnancy.
If you use a Doppler ultrasound fetal heartbeat detector, you can, with effort, usually hear the heartbeat by 12-14 weeks gestation and routinely after that."
https://oacapps.med.jhmi.edu/OBGYN-101/Text/Pregnancy/fetal_heart_beat.htm