Mendeleev thought he had arranged the elements in order of increasing relative atomic mass. For most elements this worked, but it was not always true. For a few pairs of elements, the order of the properties did not match the order of the masses.
One pair is tellurium and iodine. Tellurium has a relative atomic mass of 128 and iodine has 127. By mass, iodine should come first. But the properties of tellurium match the elements in its group, and the properties of iodine match the elements in the next group. Mendeleev put tellurium before iodine, which broke his own rule. In the modern table, argon (40) comes before potassium (39) for the same reason.
The explanation is isotopes. Atoms of the same element can have different mass numbers. The relative atomic mass of an element is an average that depends on the mass of each isotope and on the relative abundance of each isotope. If a pair of elements has isotopes with different abundances, the element with fewer protons can still end up with the higher relative atomic mass.