system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does the heart make its own electricity?
gpt
The explanation by frommerman is incorrect, it is electricity and the sinoatrial node is not a cluster of nerves. The cells of the heart have the ability to pump ions across the membrane such that the inside is usually negatively charged compared to the outside.  When the cell gets hit by the action potential, there are voltage gated ion channels in the membrane that open, and then the cell becomes depolarized.  This opens other channels and makes the heart contract.  The cells then reset themselves to restore the normal negative resting membrane potential.

The sinoatrial node is composed of specialized heart cells that have special channels such that they are leakier than the normal channels, so it sets itself off every once in a while (aka every heartbeat). If the sinoatrial node is broken for some reason, the atrioventricular node also goes off but more slowly than the SA node, and if the av node breaks there's the his-purkinje branches.

People who have had heart transplants do not have nerves that connect to the heart, but the heart will still fire on its own.  The vagus nerve tells the heart to slow down usually, but a transplanted heart doesn't receive nerve signals from the brain/spinal cord.  So it usually beats at about 100 bpm, which is what the SA node would do without external regulation.

We measure electrical activity in the heart via an ecg, an electrocardiogram.

Edited to include the part about heart transplants not needing nerve innervation to beat.