In physics, a quantity is conserved if it is the same before and after an interaction.

The mass number is conserved in all interactions including chemical reactions, radioactive decay, fusion, and fission.

The atomic number is only conserved in most cases such as chemical reactions and nuclear fission. However, it can be changed in weak interactions such as beta decay which can happen in radioactivity and nuclear fusion where atomic number is not conserved.