WordPress critical error after trying to update to 6.2 – Fatal error: Allowed memory size of 268435456 bytes exhausted

No mention of the PHP version you have, but perhaps you are using an older PHP version ? Try running PHP 7.2 for a test. Upgrade to 8.x after the site stabilizes.

You can also try renaming the plugins and/or the themes folder to bypass those settings (which will affect the site, of course). Get things running ‘bare-bones’, then add your plugins/themes. You might try installing plugins/themes with the old ones renamed, in case older versions were causing problems.

Make sure you keep the site updated – WP core, themes, and plugins – at all times. That will reduce issues in many cases.