Welcome to the MongoDB Community Forums @Raphael_Faluyi!
There is no need to close & reopen Compass if you are trying resolve connection issues. I recommend starting with the troubleshooting documentation for Compass Connection Errors, which includes some suggestions for both Self-Hosted Environments and Atlas Clusters. There are some also more general suggestions on Error: couldn't connect to server 127.0.0.1:27017 - #16 by Stennie.
Since this discussion topic is almost two years old and software versions have changed, I have also closed the topic.
Regards,
Stennie