It is related to the JavaScript programming topic Promises and Callbacks. It is important to understand the programming with these, as the MongoDB NodeJS driver API methods return callback or promise, in general. So, the steps in your program working with MongoDB will be associated with these concepts. There is no other way (I suspect).
I suggest you try the examples in the MongoDB NodeJS Driver documentation and adapt them to your own app.
Another useful source for callaback and promise programming is the MDN’s Introducing asynchronous JavaScript.