Update/modify a single existing document in a collection. The selection of the document is done by using some filters. If the collection does not already exist, then we have pass “upsert” option, if we want to create a new document.
Insert one document to collection. This command is recommended if we just need to add only one document. If the collection does not already exist, then a collection will be created first when we apply this insertOne() method.