A 500 Internal Server Error happens when the webserver receives an unexpected error.
Most of the time when this occurs on a cPanel server, it's due to having invalid coding in the .htaccess file, which looks like this in the Apache error log:
[Wed May 13 06:31:26.262337 2020] [core:alert] [pid 2140] [client 10.3.17.46:57731] /home/sean/public_html/.htaccess: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration
In this case, the server did not have the Apache module mod_env, you can avoid causing a fatal error in this situation by using the IfModule statement in the .htaccess file:
SetEnv test test
Another cause for the Internal Server Error is if the server does not have enough memory to allocate to the request:
[Fri May 08 00:42:01.220008 2020] [cgi:error] [pid 24686] (12)Cannot allocate memory: [client 10.3.17.46:31164] AH01223: couldn't spawn child process: /usr/local/cpanel/cgi-sys/wredirect.cgi