No Ava, many don't work on electric. Mine was converted for me. Took the person about 15 minutes. Whenever my electric is paid for, I use this. Mine needs an electric cord - there are conversions out there that don't. This is the less expensive way.
Basically, you open the door to the outside water heater. You have to install a thermostat (I think that's what it is) up next to the outside casing of the correct part of the water heater. That was the major part of the job. There are 4 cables - color coded - pictures following. Oh, and you replace the anode rod with one for this purpose only (which will last a long time) One of the cables goes to the new anode rod. That was it.

That's the whole picture inside. Green wire - ground. White wire (lightish blue connector) to new anode rod. Black wires (red and blue connectors) to the new thermostat. When you aren't using the electric conversion, you take off the wires - except I can leave the red connector - as it isn't connected to the outside power.

That's the new thermostat attached to the gas hot water heater.
The most important part, before connecting - run line through the door.

That runs to my outside electric outlet.
That's it.
Edited to add - when I first reconnect this way - it takes longer for the water to get hot than with gas. But once hot - it stays hot all the time. Love it. And I got it by accident - as a part in my gas water heater quit working, and where I was workamping did this for me so I could have hot water.