C# connection string with MongoDB Compass

Hi! My name is haider and I am a beginner working on my assignment to apply CRUD operation on my mongoDB database (on Compass) via a windows form application in .NET. My question is : I have not provided any connection string and even if my mongocompass is not running, how it manages to find that database by just providing the name of the database. However, if we have to connect the application to the mongodb atlas, then we have to provide the connection string. Can anyone share me the reason for that?