Welcome to the MongoDB community @Zeid_Tisnes!
Per the tutorial, make sure you rename or copy .env.local.example to .env.local after adding your configuration. Try renaming the file and restarting your Next.js app with npm run dev.
Regards,
Stennie