See this older answer., and also here.
Nuclei are conceived to contain one or more massive, positively charged particles, called protons. And the number of protons gives #Z#, the atomic number, which defines the identity of the element: #Z=1#, the element is hydrogen; #Z=2#, the element is helium; #Z=3#, the element is lithium;............#Z=23#, the element is vanadium..... How do you know these numbers? You look at your copy of the Periodic Table.
The nucleus also contains various numbers of neutrons, massive nuclear particles of NEUTRAL charge. Interactions between protons and neutrons, at impossibly short intranuclear distances, give rise to the strong nuclear force, which at these ranges is strong enuff to overcome the force of electrostatic repulsion between like charges.
The presence of neutrons also explains the phenomenon of isotopes. To use the hydrogen atom as our exemplar, most hydrogen nuclei contain ONLY a proton, i.e. the protium isotope, #""^1H#. A small fraction contain the one proton (necessarily), and 1 neutron to give the deuterium isotope, #""^2H#; a smaller fraction contain the one proton, and 2 neutrons to give the tritium isotope, #""^3H#. The isotopes are more or less equivalent chemically, because chemistry is an electronic not nucular phenomenon.
As #Z# increases, isotopic substitution becomes more common, and the atomic mass reported on the Periodic Table is the weighted average of the individual isotopic masses.
So what's the moral, and take-home lesson, that you have to take on board? #Z# is defined by the number of nuclear protons; and #Z# IDENTIFIES THE ELEMENT UNEQUIVOCALLY. If #Z=2,13,27,49#, what elements have we got, and what are their atomic masses? Can you tell me the number of electrons in the neutral element? And can you tell me the number of neutrons in their stable isotopes?