I am following these tutorials as I wanted to start with MongoDB and the MERN stack:
I understood you error as I also faced it will trying to connect to mongoDB.
This error is simply popping up because your mongoDB local server failed to connect to remote server probably because you don't shut down the file correctly.
How to fix:
c:\program files\mongodb\server\4.2\bin).That's it , your mongodb server is running again. You can check again in cmd prompt by typing same command.