I want to add that adding a memory limit in wp-config.php can fix crashes from running out of memory. There might be a limit placed by the host, so you can contact them to increase the limit. This is only if memory is the cause of this issue.
There might be a plugin available so that you do not have to create your own using code. If it is an external page then an editor such as Tiptap, Quill, or Trix can be used.