Every element has an identity card, and the atomic number is the ID number printed on it. Hydrogen's atomic number is 1 because it has one proton. Helium is 2, lithium is 3, and so on, all the way up to oganesson at 118. This number is not arbitrary — it is the fundamental property that makes each element what it is. Change the number of protons in an atom's nucleus, and you literally transform it into a different element.
The atomic number does double duty: it tells you both the number of protons and, for a neutral atom, the number of electrons. Since it is the electrons that determine how an atom behaves chemically — how it bonds, reacts, and interacts — the atomic number is essentially the master key to an element's personality. That is why the periodic table is organized by atomic number: elements with similar electron arrangements (and therefore similar chemistry) naturally fall into the same columns.
This concept might seem obvious today, but for decades chemists sorted elements by atomic weight instead. The problem was that atomic weight sometimes placed elements in the wrong order. In 1913, a young British physicist named Henry Moseley used X-ray experiments to determine the nuclear charge (proton count) of various elements and proved that atomic number, not atomic weight, was the true organizing principle. Moseley's work filled in gaps and corrected inconsistencies in the periodic table, cementing atomic number as the foundation of modern chemistry. Tragically, Moseley was killed in World War I at age 27, cutting short what could have been one of history's greatest scientific careers.