The reason for the error should be visible in the error log. You can find it in your hosting area. If necessary, the support of your hosting can help you.
Alternatively, you could also enable debugging in WordPress. How to do this is described here: https://ww.wp.xz.cn/support/article/debugging-in-wordpress/ – also here the support of your hosting can help you if necessary to edit the file accordingly.
In both cases you should be able to see what the cause is in the logfile.
If you’re using WordPress 6.5 or higher, the email address saved at Settings -> General should have also received an email with a recovery link that will send a site into debug mode where you can address the problem.
If you are, and you did not receive that email, it sounds like your hosting provider has disabled PHP’s mail() function, which WordPress uses to send you email notifications and is also used by contact form plugins and more.
This is a common safeguard employed by hosting providers when they suspect that another customer on the same server is sending spam emails directly from the server. Another alternative is that PHP’s mail() function is still active, but spammer activity from the server has already caused any email sent from it to be blocklisted. This would result in the emails being sent but never received by any email address with basic anti-spam capabilities.
Once you’ve recovered access to the site, you can check this by leaving a comment on your site and checking if you receive an email. Another alternative would be to use the Health Check plugin and send yourself a test email from the plugin’s Tools tab to see if it works.
If you didn’t receive a test email, you could try using an SMTP plugin to configure your WordPress site to use your email’s outgoing mail server instead of PHP’s mail() function. And, if the chosen SMTP plugin doesn’t work either, I recommend reaching out to their support.