In MongoDB the db.collection.updateOne() method updates a single document within the collection based on the filter.
methods
MongoDB insert()
In MongoDB the db.collection.insert() method inserts a document or documents into a collection.
The collection part is the name of the collection to insert the document/s into.
MongoDB insertMany()
In MongoDB the db.collection.insertMany() method inserts multiple documents into a collection.
The collection part is the name of the collection to insert the documents into.
MongoDB insertOne()
In MongoDB the db.collection.insertOne() method inserts a single document into a collection.
The collection part is the name of the collection to insert the document into.