When you are using the Cloud Function the Cloud Build API must be enabled in order to deploy your Cloud Function, it's well documented in the tutorial(Before you begin). The Cloud Build Service Account will automatically generate when you enable the Cloud Build service in your Google Cloud project and it looks like:
[PROJECT-ID]@cloudbuild.gserviceaccount.com
Regarding this:
I deleted in 27/jul/2021 cloud build or cloud run (I don't use cloud run in my project) I deleted in GCP console
Please note, deleting Service Account:
When you delete a service account, applications will no longer have access to Google Cloud resources through that service account.
And based on your issue tracker, it seems the solution is to recover your deleted Service Account. The deleted Service account can recover within 30 days. To undelete or recover, you must find the the numeric ID or ACCOUNT_ID for the deleted service account that you can get in Cloud Logging/Log Explorer, here is the tutorial.
Once you have obtained the numeric ID or the ACCOUNT_ID, run the following in your CLI or Cloud Shell or Cloud SDK:
gcloud beta iam service-accounts undelete ACCOUNT_ID
output:
restoredAccount:
email: SA_NAME@PROJECT_ID.iam.gserviceaccount.com
etag: BwWWE7zpApg=
name: projects/PROJECT_ID/serviceAccounts/SA_NAME@PROJECT_ID.iam.gserviceaccount.com
oauth2ClientId: '123456789012345678901'
projectId: PROJECT_ID
uniqueId: 'ACCOUNT_ID'
UPDATE:
The root cause of the error was missing the `Cloud Build Service Account` permission and it was solved by adding this permission.