This happened when I was young in my first ever aquarium and scared the heck outta me, I though my fish were being electrocuted. It’s one of the unfortunate flaws in the design of a standard heater, if two of those filaments get too close, they’re potentially gonna short out and arc. Provided the glass case isn’t breached your fish should be okay if you catch it early. Over 10 years later I’m still super heater paranoid 😂 I always keep a couple of spares. Like previously stated, heaters are just notoriously unreliable, when you think how many times it potentially cycles on and off in its life, it’s only a matter of time before something goes bad.