If you’re wondering why Garnet can generate electricity, its because natural Garnet is thermoelectric, meaning it creates a charge when it experiences a change in temperature.
Given Sapphire’s ice powers and Ruby’s heat abilities, we can assume Garnet is using those properties in tandem to generate huge amounts of electricity.