Since you mentioned in the comment section that you are using Cloud Run Functions as the service, I recommend reviewing this documentation, which will guide you on how to deploy a Cloud Run function from source code and help you understand the build process during deployment.
As suggested also by John, you can also view runtime logs for Cloud Run Functions in the Logs Explorer so you could see the actual error. You can also check the Cloud Run Functions troubleshooting errors page which might help you.
I hope this helps.