If two atoms have the same atomic number but different mass numbers, what are they called?
They are called isotopes.
The identity of a chemical element is given by the number of protons its atoms have in their nuclei.
More specifically, atoms that have the same number of protons in their nucleus belong to the same chemical element. The number of protons an atom has in its nucleus is given by the atomic number.
Let's take the three naturally occuring isotopes of hydrogen as an example.
In order for an atom to be a hydrogen atom, it need to have exactly one proton in its nucleus. However, the number of neutrons it can have in its nucleus can vary.
As you can see in the above image, all those three atoms have one proton in their nucleus. They have, however, different numbers of neutrons.
Those three atoms have the same atomic mass, but different mass numbers, which means that they are isotopes.