Get a can of gas and a hose with a primer bulb (outboard motor fuel tank hose). Put one end in tank other end to the carburetor (disconnect wire to fuel pump and plug off or it WILL spurt fuel from main tank everywhere). Place can 1 or 2 feet above level of carburetor so it siphon feeds the genset.
Run it. If problem is fuel pump or fuel line you are now running real well. Cost= can of gas + 20 for a fuel hose+ a few fittings and clamps. or ANY competent car mechanic can do this for you.
In my experience with onan 4 and 6.5 gas gensets the float tends to stick in the carburetor intermittently. The fix is to remove the plastic float and give a few swipes of a file to those little side edges that fit between the metal body pieces. I swear ethanol additive swells the darn bowl.
Do not leave the siphon feed system hooked up to the genset wile its not running. If the float is stuck in open position fuel will fill the cylinders and crankcase through the intake. ( I have done this ).
This is just to verify its fuel pump making noise/ and or related to shut down issue.
Also fitting a clear hose or fuel filter into will give you a visual if air was making it to fuel pump.