MongoError: Authentication failed

I am using mongoose to connect to the atlas and I made sure of entering the correct username, password and
database name and have the network access

But still, there is an error saying,

Here is my connection code ,

can anyone tell me where I have done a mistake?

Authentication failed means wrong user name, wrong password or wrong authentication database.