There is a known issue with WooCommerce; the developer has released information and fixed it.
Many WordPress + WooCommerce users have reported issues with some of the versions of WooCommerce. This has affected lots of different web hosts.
You may read the following:
https://wordpress.org/support/topic/woocommerce-causing-critical-error-on-my-website/
https://wordpress.org/support/topic/version-9-0-is-causing-a-critical-error/
In short, you can overwrite the plugin with the latest version of WooCommerce 9.0.2, and if the issue persists, please also make sure the file does not exist at /plugins/woocommerce/includes/class-wc-api.php
If you need assistance, please create a support ticket so we can help you resolve the issue.