Welcome to the Onan owners club.
Similar situation for us on a brand new 2023 unit. (gen says 2022 on it)
I have googled this problem to no end. (still look every now and then)
There are a few very interesting youtube people who claim they have solved the mystery.
According to the ones I have looked at (that seem like reputable posters) their claim is if it is "over full" of oil it will cause the shut down and a 36 error code to appear.
Go to youtube and search "onan generator won't stay running" and you'll have plenty to look at that may help.
My disclaimer..... I have not run mine since this has happened and I have returned home in AZ. It is still pretty hot in the valley so I have been waiting for a cool down to check mine and test run it under a load and see what happens. If I still have the shut down problem I will try the lowering the oil level trick and see what happens.
I will say this... when I pulled the dipstick on mine the oil was so full it ran out over the threads.
Also I would also say sticking to their guide that suggests you run the generators once a month for 10-15 minutes is probably good.
I also run a product called seafoam in my gas tank to help keep from gumming and clean the varnish out.