An atomic number assigned to an atom changes when the number of protons in the nucleus of the atom changes. By definition, the atomic number of an atom is the number of protons in the nucleus of the atom.
Protons hold a positive electrical charge and they determine the charge of the nucleus. Adding or removing protons, for instance, during alpha decay, changes the charge of the nucleus, which subsequently causes the atom to change into a different element. For example, adding a proton to the nucleus of a hydrogen atom creates a helium atom. Therefore, when protons are added or removed from the nucleus of an atom, they create a different element.
In beta decay, the end result is the same. During beta radiation, the number of protons in an atom increases by one, and hence, a new element is formed.
Neutrons do not carry an electrical charge. Adding or removing them does not alter the electrical charge of the nucleus. Only the number of protons can change the atomic number. Atoms always contain an equal number of protons and electrons. Therefore, when protons are added or removed, the same goes for the neutrons. This is so that the new nucleus is stable.
The atomic number of an atom determines the element. However, the atomic number of an element never changes. The number of protons in the nucleus of every atom in an element always remains the same.