The second “law” of thermodynamics says that in a closed environment, some things can only happen in one direction. They are not reversible.
Calling it a law does not make it absolute; if we see a system that doesn’t work that way – like a cup of water spontaneously becoming ice and warm water – the “law” will be quickly replaced by something that better describes nature. But we have observed many galaxies, and they all seem to follow this rule.
To make things like life happen, there must be energy that we can use. Generally, energy can only transform from one type to another. So barring nuclear fusion, there is always the same amount of energy in a closed system. But because of the second law, a closed system will eventually have no more energy that can be used to do work. Which is the time to buy more gas 🙂
So it’s great that the Earth has the Sun to provide usable energy, which drives all the life on Earth, including us.
And if the sun will run out of fuel, hopefully by that time (billions of years) we will have migrated to somewhere else.
And if the universe runs out of fuel?
Maybe it will collapse and renew again. Maybe it will fade into coldness. Maybe it will rip itself apart.
Maybe there are more universes outside what we can see.
We currently don’t know enough about our universe to say at this point…