How to setup vpc connector for firebase cloud functions?

This seems now to be handled in latest firebase-tools v8.9.0 version.

Must be used in conjunction with firebase-functions v3.11.0 or higher

https://github.com/firebase/firebase-tools/releases/tag/v8.9.0

functions
  .runWith({
    vpcConnector: 'test-connector',
    vpcConnectorEgressSettings: 'PRIVATE_RANGES_ONLY'
  })
  .auth.user()
  .onCreate((user) => user);

Cloud Functions for Firebase doesn't actually run "on top of" GCP. Firebase just adds tools and SDKs that make Cloud Functions easier to use for some developers. The core Cloud Functions product is exactly the same, no matter if you're building and deploying with Firebase tools or gcloud.

You should still be able to configure a VPC connector for functions deployed with the Firebase CLI. You will just not able able to configure it on the command line like you can with gcloud. Instead, you will have to configure the connector in the Cloud console after deploying the function, exactly as described in the documentation you linked to.