The periodic table did not appear overnight. It is the result of centuries of scientific discovery.
In 1869, Dmitri Mendeleev published the first widely recognized periodic table. He even left gaps for elements that hadn't been discovered yet, predicting their properties with remarkable accuracy.
With the discovery of the proton and the understanding of atomic numbers by Henry Moseley, the table was reorganized from atomic weight to atomic number, fixing the few lingering inconsistencies in Mendeleev's design.
The table currently contains 118 confirmed elements, ending with Oganesson (Og). Scientific research continues as teams attempt to synthesize elements in the 8th period.