If instead of choosing mongosh in the list you choose connectionString and manually connect with mongosh, does it work? i.e.
mongosh
connectionString
mongosh "mongodb://localhost:27017/?directConnection=true"
if that does work, there might be some issues in your code.