Please set the Allow Anonymous Guest Access
setting to "Yes and check if it works!
Admin > Stores > Settings > Configuration > Services > Magento Web API > Web API Security.
More, check for user role and authentication token. Or maybe the session (auth token) expires. https://devdocs.magento.com/guides/v2.3/get-started/authentication/gs-authentication-token.html
Also, it could be an issue with the PHP version as well. Please visit the post here.