Copy .env.example to .env.local and set the NEXT_PUBLIC_FIREBASE_* variables, then restart the dev server.
.env.example
.env.local
NEXT_PUBLIC_FIREBASE_*