Atomic number is the total number of protons present in the atom of the element while mass number is the total number of protons and neutrons present in an atom of the element.
Isotopes have the same number of protons and differ only in the number of neutrons present in the atom. Hence, isotopes have the same atomic number but different mass number.