How to enable Firebase project settings available to Firebase Studio Next.js app?

I am building a frontend using Firebase Studio in Next.js.
It is published on the Firebase Hosting.
The Next.Js web app accesses the config of Firebase(for Firebase Auth) using below variables:

const requiredEnvVars = [
  'NEXT_PUBLIC_FIREBASE_API_KEY',
  'NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN',
  'NEXT_PUBLIC_FIREBASE_PROJECT_ID',
  'NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET',
  'NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID',
  'NEXT_PUBLIC_FIREBASE_APP_ID',
];

How to make these settings available automatically? Does it require any settings?

.env.local with configs in the root directly of project works