If you touch water heater with power ON, it might kill you.
Turn power off.
Check that ground screw is connected to water heater.
Take wires off elements.
Use multimeter set to read ohms.
Test each element screw to bare metal part of water heater.
If meter shows reading, then element is shorted to ground, but the crack if far enough along in the element that it does not trip breaker.
Test thermostat screws to metal tank in same manner.
Disconnect power wires from tank wires at top of tank.
While wires are disconnected from elements and thermostats, test each bare wire end to metal tank.
If meter reads ohms on end of any wire, then there is a short to ground somewhere on that wire.
Problem might be elsewhere in electrical system, and pipes are not bonded (or grounded) to outdoor ground rod.
I’ve worked on homes where the ground wire came loose from ground rod. Remember if you touch the ground wire and the ground rod, then you become part of the ground, and will get killed fairly quickly if power is flowing to ground.
The hot and cold pipes may not be grounded together. Jumper a #6 bare copper ground wire between the hot and cold pipes at water heater. This will connect Hot pipes to cold water pipes, and then to outdoor ground rod.
Even so, somewhere in the house is a ground fault that is connected to the water pipes, and the water pipes are not properly grounded. Electrician can solve problem without risk to you.
It will be interesting to hear what is discovered.