Let's take the hydrogen atom....the most abundant element in the universe. All hydrogen atoms contain the ONE nuclear proton, i.e. #Z=1#, and this is what defines the atom as hydrogen, i.e. #""^1H#. A few hydrogen NUCLEI contain a neutron in addition to the defining proton, to give the deuterium isotope, i.e. #""^2H#, and a smaller few hydrogen NUCLEI contain TWO neutrons, to give the tritium isotope, i.e. #""^3H#. The weighted average of the isotopic masses gives rise to the atomic mass quoted on the Periodic Table, i.e. #1.00794*g*mol^-1#.
Most higher elements have an envelope of isotopes, and their weighted average is the atomic mass printed on the Periodic Table.