If energy isn’t created or destroyed, a closed system should have a constant energy so if the universe is closed, its energy should be constant. But it isn’t that simple as in an expanding universe every photon now has a longer wavelength than it did a moment ago and so has less energy than it did before. The cosmic background radiation that was once white hot is now freezing cold because expanding space took its energy and didn’t give it back, so the total energy is reducing. A universe expanding into something isn’t closed so energy isn’t conserved because expanding takes energy. On the other hand, the energy of the universe is mostly dark energy, which must increase to keep the cosmological constant the same, so the energy of the universe is increasing. Either way, it is very unlikely that the total energy of our universe is constant.
Energy is locally conserved, as solar panels, windmills and dams convert radiant, wind and gravitational energy into electricity, but it isn’t universally conserved. Just as the bank notes in a country might be locally constant but global inflation can reduce their value, so space expanding can alter the value of energy on a universal scale.
If energy isn’t always conserved, what is? In quantum realism, our virtual universe arose when the original quantum reality split into the servers and clients that generate it, in what physics calls inflation. If this was a once only event, the number of photons in existence has remained constant at a finite number. Expanding space changed energy but not the total number of photons.
If every physical event is a reboot of photons in various forms, as light or matter, photons are always conserved. Current physics conserves matter, charge, energy, momentum, isospin, quark flavor and color but each law is partial, as matter isn’t conserved in nuclear reactions and quark flavor isn’t conserved in weak interactions. The underlying conservation is that of photons.
If all energy, radiant, kinetic, potential and nuclear, is based on photons then the conservation of energy reflects the conservation of photons. For example, when a solar sail turns radiant energy into kinetic energy, photons enter the sail and are conserved. Photons also explain potential energy as when a rocket crashes on Jupiter with more energy than the potential energy it took to leave earth, it acquires photons from Jupiter’s gravity. Photons are the means that potential energy lacks. The universal conservation is of photons because everything is light upon light, nothing but light.