This question already has an answer here:
How the expansion of the universe doesn't violate the principle of the conservation of energy?
If we would put a spring between two objects, the distance would get bigger between them, so would the potential of the spring. And with objects with mass, the same goes for the gravitational potential energy between them...
What am I missing here? Where does this energy come from?