Socket 'connect' timed out after 30005ms (connectTimeoutMS: 30000)

hey guys. i am new here andr ecently Install and Configure MongoDB community. but when i am testing it with compass shosing error:
Socket ‘connect’ timed out after 30005ms (connectTimeoutMS: 30000)

more context: using MongoDB atlas in different port

Hello Manish! Welcome to the MongoDB community!

What’s the connection URI you’re using in Compass?

For a local MongoDB installation, the URI should be mongodb://localhost:27017.

For Atlas, you can find your connection string by clicking the Connect button under your deployment in the Atlas UI. That’s described in the docs article.