Internal server errors (error 500) are often caused by plugin or theme function conflicts, so if you have access to your Dashboard, try deactivating all plugins. If you don’t have access to your Dashboard, try manually resetting your plugins (no Dashboard access required). If that resolves the problem, reactivate each one individually until you find the cause.
If that does not resolve the problem, try switching to the Twenty Twenty-Four theme to rule out a theme-specific problem. If you don’t have access to your Dashboard, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific problem.
If that does not resolve the problem, it’s possible that a .htaccess rule could be the source of the problem. To check for this, access your server via SFTP or FTP or a file manager in your hosting account’s control panel, and rename the .htaccess file. If you can’t find a .htaccess file, ensure that you have set your SFTP or FTP client to view invisible files.