In nuclear fusion, such as inside the sun, energy is released (ie sunshine) but, as Einstein's e=mc^2 demands, there is a concomitant loss of mass. It is tiny, compared to the mass of a proton, but, if you add up the masses of the nucleii which go into the fusion and compare with the mass of the fusion product, there is that discrepancy.
The sun is therefore trading mass for electromagnetic emissions (of which heat and light are just two narrow slices).
Multiply up by the billions of suns and thousands of billions of galaxies and the universe is, likewise, losing mass and turning it into electromagnetic radiation.
No wonder expansion is accelerating!