Interesting follow-up!
A baby's cardiovascular system begins developing three weeks after conception. Before then, the following occurs:
The cardiovascular system's embryological development begins with cardiac progenitor cells' migration in the epiblast, just lateral to the primitive streak. These cardiac progenitor cells eventually develop into cardiac myoblasts. Within this same splanchnic layer of the mesoderm, so-called "blood islands" eventually undergo a period of vasculogenesis to form vascular structures. Coalescence of the blood islands eventually forms a region known as the cardiogenic field. The cardiogenic field is initially horseshoe-shaped and surrounded by cardiac myoblasts with the cardiogenic field's apex, eventually developing into primitive ventricles along with their respective outflow tracts. Ultimately, the cardiogenic field changes its configuration by cephalocaudal rotation. By doing so, it forms a primitive heart tube continuous with vascular structures.
https://www.ncbi.nlm.nih.gov/books/NBK537313/At around six weeks, the embryo develops a tube that generates sporadic electrical impulses that eventually coordinate into rhythmic pulses. I am assuming those electrical impulses are produced by the pacemaker cells. The pacemaker activity develops in the inflow tract of the primary heart tube and is the first element to function in the cardiac conduction system. Action potentials spread from the posterior inflow tract to the anterior outflow tract of the heart generating a wave of contraction.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1768983/