We had a problem that was caused by a kink in the fuel line that was caused when the generator tray was pulled out and pushed in. The link broke the line slightly and allowed air to enter the fuel line. Www rerouted the fuel line and the problem went away the air in the fuel line caused the generator to stop. Took us months to figure it out. Check the entire fuel line to the generator. GOOD LUCK
If it is a fuel supply problem, then when it stops and you attempt to restart, it will have to crank for at least 5 to 10 seconds minimum to supply fuel. If it starts right back up, you have another problem not related to fuel supply. Doug
Or the fuel filter which is easy to change. Underside of generator will be a sliding latch which will expose the fuel filter. I think I paid $16 or $17 for one a couple of weeks ago. Youtube is your friend as is Amazon
Assuming you have a diesel generator, the fuel comes from a fitting a few inches up from the bottom of the coach fuel tank. If your fuel tank is low it will keep the generator from starting. Hopefully nothing more serious.