Typically this is caused by a bad seat safety switch.
Generally the most common problems with these engines is fuel-related, though ignition can be a problem if the blade has struck something shearing the key.
Mine was doing the same thing, and it turned out one of the plugs was not firing, which turned to be not the plug but the coil for that side (Briggs & Stratton 18hp on an MTD 1650 lawn tractor)
It may stall out.
Its out of gas
automatic choke needs adjusting
incorrect operation of choke choke not shutting off after warm up
Carburetor not adjusted correctly
could be that the choke is not adjusted right
A faulty muffler will not cause this but a clogged catalytic converter will.
More than likely it needs to have the carburetor cleaned.
If the engine starts: Let the engine warm up for about 5 minutes and S-L-O-W-L-Y close the needle valve (rotate clockwise) until the engine starts to stall for lack of fuel. Then open the needle valve (rotate counter clockwise) until the engine starts to stall because of too much fuel. Set to half-way between the two extremes. If the engine doesn't start: Close the needle valve by screwing it in clockwise just to a point where you feel it stop - DO NOT FORCE IT!! or you will ruin the tip. Open the needle valve about 1-1/4 to 1-1/2 turns. This should be okay to start the engine and then follow the procedure above. If the engine hesitates under a load, open the needle valve about 1/8 turn for a slightly richer mixture. This is the basic standard procedure with nearly all Briggs motors.