The nucleus is tiny and dense. It holds nearly all the mass. The electrons occupy the much larger space around it.
The atomic number is the number of protons. It defines the element: every atom with 6 protons is carbon.
The mass number is protons plus neutrons.
In a neutral atom, the number of electrons equals the number of protons.
Worked example: an atom with atomic number 11 and mass number 23
Protons = atomic number = 11, so this is sodium.
Neutrons = mass number - protons = 23 - 11 = 12.
Electrons = 11, because the atom is neutral.
Common mistake
Changing the number of protons to “balance” an atom. Protons decide which element it is. Add a proton to carbon and it is no longer carbon. It is nitrogen.