The decrease in mass when the nucleus is formed is the mass of the energy released. In nuclear fission a heavy nucleus splits into two smaller pieces. In nuclear fusion two light nuclei unite to make a heavier one. In each case binding energy is released. A more stable nucleus is formed.
Fusion works for nuclei lighter than iron.
Fission works for nuclei heavier than iron. Therefore iron is the most stable nucleus . The binding energies holding nuclei together are roughly a million times greater than the binding energies holding molecules together. This is why nuclear explosions are vastly more powerful than chemical explosions .