With a gas golf cart that won’t start you should first make sure to use the choke button to ensure that there is gas going to the system. Almost always use the choke if the cart has been sitting for a while.
More things that you can look at to get the gas cart started:
Check spark plug condition – possibly fouled or flooded?
Look to see if spark plug wires are corroded or loose
Any loose connections to ignition coil or rev limiter
Ignition coil may be bad
Low cylinder compression
Possible water or dirt in the fuel system or carb
Blocked or dirty fuel filter
Plugged up exhaust system
Carburetor needs adjustment
Starter belt may be slipping – will not turn over engine