BTW
Can you set Memory Limit: 512M if yes - use that new value, and keep PHP 8.1 :)
There is a chance that it has been exceeded. The memory limit determines how much RAM memory resources can be allocated to process execution. If the process uses more resources than is currently available, this may result in errors such as error 500. Some servers – depending on their specifications – will allow you to change the default limit in CPanel settings or only by hosting support help.
And also increase value of max_execution_time
Check if back-end editor works with current Memory limit, it may consume less memory then front-end.