MERN stack cannot connect to mongoDB Atlas

I go into a little more detail at querySrv errors when connecting to MongoDB Atlas | ALEX BEVILACQUA, but ultimately the issue is the DNS query for the SRV and TXT records required to construct the connection string from the mongodb+srv:// URI scheme is failing.

That’s why falling back to the mongodb:// URI scheme works.