broknsymetry
Taking a guess, the key or pin in the flywheel could have sheared, allowing the flywheel to shift back and forth and throwing off the magneto timing when you start it. I’m not familiar with the electronic ignition on some mower engines, just the ones where the flywheel has a magnet to energize the mag coil at somewhere before piston TDC.
(Are you sure you didn’t run out of gas, I have a story about a guy who worked on a car for a whole weekend with that as a cause 😃 )