I agree with @guillaume blaquiere, Cloud Source repository 2nd gen does not exist.
This is the documentation with regards to Cloud Build repositories (2nd gen).
With Cloud Build repositories (2nd gen), you can create and manage repository connections programmatically. You can set up a single connection for a repository and use Secret Manager secrets from that connection to programmatically set up additional connections across regions and projects. You can also set up connections using Terraform, in addition to the Google Cloud console, gcloud command-line tool, and the API. You must create a host connection prior to linking repositories when using Cloud Build repositories (2nd gen).
Cloud Build repositories (2nd gen) can be used with the following providers:
You can invoke builds on commits and pull requests. You can also invoke builds manually, on a Pub/Sub topic, or on an incoming webhook event.