To install the MongoDB, you need to execute the following steps:
Download the MongoDB setup file from the Download Center of MongoDB. For most scenarios the free Community Edition is sufficient. Choose a version (4.2 is recommended) matching the architecture and OS of the machine which is going to host your user database.
Consult the MongoDB installation instructions (Windows, Linux) to setup MongoDB as a service on your machine. You might want to change the following settings: