Some physicists prefer to explain the problem of conservation of energy in General Relativity by considering the gravitational potential energy of the universe that would cancel all the other energies and therefore the energy in the universe would be conserved this way.
However, many other physicists opt to just say that energy is not conserved 1. If we take this explanation, we can conclude that energy can be created or destroyed in cosmological scales, as in 1 says:
"In general relativity spacetime can give energy to matter, or absorb it from matter, so that the total energy simply isn’t conserved"
The photon redshifting due to the expansion of the universe is usually given to indicate that energy can be lost in General Relativity. But I cannot find anything that would be an example of spacetime creating energy or giving it to matter (as it says in the reference 1 that I quoted). Therefore, if the conservation of energy is not well defined in General Relativity, can energy be created?