You need the model number to look up correct manuals to he people out.
On onan gens that is a fuel cutoff solenoid there is a pin inside when 12 v is applied it pulls back to let fuel go in . If your gen is the same one wire is just connected to ground on the block and the other wire is the hot follow both wires back to see if there shorting out.
You can take the pin out and unplug the hot wire and see if it will run since its not a gravity feed I don't know why they started putting those fuel cutoffs on them I guess to make more money.