Basically, you should make sure your node connected as an input to MongoDB node returns the data that you wish to update along with the identifier (usually Id) to use to find the document.
In my example, I have a field name _id which has the id of each item. I am using n8n to find the document using that id and then return add the field (storeLocation) that I wish to update.