Thanks for the linking to parent explanation!
After running
collection = bpy.data.collections.new("MyTestCollection")
bpy.context.scene.collection.children.link(collection)
or
bpy.ops.collection.create(name = "MyTestCollection")
bpy.context.scene.collection.children.link(bpy.data.collections["MyTestCollection"])
the collection is created and shown in the outliner.
I still wonder whether these two ways of creating a collection are equivalent ?
If they are not equivalent, which is preferred in what situation ?