Solution 1: Http Basic Authentication
REFER: Secure Cloud Functions With Http Basic Authentication (HTTPBasicAuth) - Python.
Solution 2: Firebase Authentication
If your client (Android, Web JS, etc.) is using Firebase Auth.
REFER: Secure Cloud Functions With Firebase Authentication (Python).
Solution 3: OIDC Account
LATEST: Secure Cloud Functions for Cloud Scheduler
If you call cloud functions using internal services like Google Cloud Scheduler.
REFER: Secure Cloud Functions With OIDC Account (from Cloud Scheduler) - Python.
References: