Great advice above. I and others here always teach the basic diagnostic scenario: an engine has 4 needs/components to run: Fuel/air mixture, spark(fire), compression, and timing. Start with the obvious/easiest DIY possibilities before you resort getting a mechanic.
Fuel/air: gas filter, hoses, tank cap vent, carburetor............. there are simple DIY methods, i.e. the tank cap test above, or remove the spark plug and pour a tiny bit of gas into the cylinder, install plug and attempt start. If it fires, then that is a start to figuring out the fuel/air problem.
Spark: Spark plug, plug wire, wiring, safety cutoffs, ground wire, ...............
Compression: not beyond DIY, but the cylinder rings and valves affect this.
Timing: All of the above has to happen in correct time/moment, especially the spark/compression/fuel. This takes a bit more diagnostic skill. A broken flywheel key ($3) can cause this.
When my Exmark zero turn did your symptoms, I learned that the fuel filter got a "glug" of material that starved the engine of fuel. Sit for awhile, start up a bit, then stall. A simple $10 fix.
Best of luck! And welcome to this great forum.