Good to know about learning data operations on MongoDB! Here is some info.
update method is from older versions of MongoDB (for example, in v2.2 or earlier; and current version is 4.4), and by default it updates one document only; the first document that matches the query filter. There is an option to specify that the update can happen in multiple documents matching the query filter. The
updateMany methods are introduced in MongoDB v3.2 and their method names clearly state their function.
Similar is the case with the
insertMany methods. With
insertOne you can insert one document into the collection.
insertMany accepts an array of documents and these are inserted. The
insert (the method from older versions) takes a single document by default, and there is an option to insert multiple documents supplied as an array.
Note that the
insert methods also have the newer features, and can be used as you like.
You can refer (syntax and examples) the above methods in the MongoDB database server documentation for the latest as well as the older (a.k.a. legacy) versions at: