This article guides you to create a free database in Atlas cloud and connect to it.
For MongoDB Compass installation and basic usage, see my article MongoDB Compass
For MongoDB Shell installation and basic usage, see MongoDB Shell
We need to white list the IP addresses for security reasons. Only the whitelisted IP can be connected to the cluster. In other words, it blocks all connections, so that the unauthorized connection cannot access. This is the first security layer
Then, create your desired Username and Password. This is the second security layer.