Like others point out, the Earth’s magnetic field isn’t typically used in power generation. In fact as far as I know it has never been used to generate useful power, though I am not certain.
Most electrical power is generated by spinning an electromagnetic power generator shaft with some heat engine like a turbine or a diesel or gasoline engine or a steam engine, or spinning it with a turbine driven by falling river water or one driven by the wind.
You can also generate it with chemical reactions in a battery cell, or in a fuel cell.
You can also generate it by the thermoelectric effect, especially with Peltier-type semiconductor thermopiles.
You can use solar cells.
You can even generate it with vibrating magnets on springs, or with Beta-emitting radioactive sources, or by rubbing materials together and causing triboelectrification, or with a microphone, or with machines that push charge around mechanically without any magnetic effects, such as Wimshurst and van de Graaf generators, or the proper arrangement of water dripping out of tanks, or the electrophorus. I think these are very obscure nich devices or even just intriguing demonstration devices.
Nasa engineers were once surprised to find that a pipe they had mounted outdoors was suddenly spinning on its own. They had mounted a very nice straight length of thin-walled and blackened metal pipe horizontally, and suspended it on bearings at both ends so it could rotate like a shaft or a drill bit.
The next morning, the thing was spinning all on its own.
They figured out that the sunlight was heating whichever side was facing upward, making that side expand more so that the shaft bowed upwards in the middle, which of course was not stable. So the shaft would start to fall over, one way or the other, but that changes which side is getting heated. The shaft never caught up with itself and kept spinning as long as the sun heated it.
At least, this is if I recall correctly.