The world needs a new source of energy, an unspillable source.

Can we power the world using magnets?

Coal is burned to create steam which is used to push a generator which causes energy and electricity. Coal destroys the world and is going run out soon. Is there a way to push generators using high powered magnets? It seems to work for magnet trains, would it work for generators? If not, what’s the problem?