Here's why:
* Protons and neutrons reside in the atom's nucleus. They are much heavier than electrons, which orbit the nucleus.
* Electrons are extremely light compared to protons and neutrons, contributing almost negligibly to the atom's overall mass.
Therefore, the mass of an atom is primarily determined by the number of protons and neutrons in its nucleus. This is also why the atomic mass of an element is usually very close to the mass number, which is the sum of protons and neutrons.