Either the ignition switch is faulty or the ground wire to the switch has come off.
There are two ways for the engine to be stopped.
The ignition switch grounds out the magneto kill wire
The ignition switch cuts power to the fuel solenoid & the engine starves.
Neither are happening so that puts the ball firmly in the switches court.