Need more info- when you say "it didn't even try to start", what did it do? If literally nothing happens when you push the button, it's an electrical problem. It could be a bad battery, bad switch, bad solenoid, bad starter, bad wiring, etc. If it spins merrily away but doesn't start, then it's either fuel, spark, or compression. Compression rarely goes away without warning, so it's likely not the problem.
ALWAYS start with stuff that's free to check, unless you like to waste money by throwing parts at a problem. First rule out of a fuel problem as was mentioned is to simply make sure you have enough fuel in the tank- if your fuel level is below 1/4 the generator won't run. First rule out of an electrical problem is making sure all of the battery and starter connections are clean and tight. With such a low voltage, high amperage system, it doesn't take much of a bad connection to keep something like a starter motor from working.
2017 VW Golf Alltrack
2000 Ford F250 7.3