Not a fit for every scenario, but you can set a minimum number of instances for Firebase to keep ready. Should help reduce cold starts: https://firebase.google.com/docs/functions/tips#min
You also want to be sure your code is optimized[2]. For example, don't require module packages unless the function needs it, else you're loading unnecessary packages. I usually set a global variable `let fetch;` and in the function that requires fetch initialize it `fetch = fetch ?? require("node-fetch);`.
[1] https://www.ayrshare.com/a-firebase-cloud-functions-cold-sta... [2] https://firebase.google.com/docs/functions/tips