Chemical reactions involve a separation, combination, or rearrangement of atoms.
During a chemical reaction which involves breaking and making a bond some amount of matter is destroyed some are converted to energy. Hence, when sodium and oxygen react to form an ionic compound, the mass of the compound is less the sum of the masses of the individual elements