In an atom almost all of its mass is gathered right in its centre called the nucleus which consists of protons and neutrons in it
Therefore,
the number of protons and the number of neutrons determine an element's mass number.
mass number = no. of protons + no. of neutrons.