Why does caching cause my app to stop working on production?

I have created an app which is working fine without caching. As soon as I run command config:cache app stops working. App is working fine on local environment even after cache command running. Issue is when running on production. Here is the screenshot:

Any idea why this is happening?

After debugging found the issue in AppServiceProvider not getting .env values SHOPIFY_API_KEY etc

If I run php artisan config:clear command app works fine