Critical issues in site health area

I have issues in the site’s health area https://my-site.com/wp-admin/site-health.php

3 Critical issues

“Your site is set to log errors to a potentially public file.

The REST API encountered an error”