Check if the collection have unique index on the column.
here you will get unique index on userName. drop it
It will return all the indexes. If it have unique: true then drop it and then insert records.
OR just use
It's not the error because of mobilenumber. it's because of username. you are trying to insert multiple username with null value which is violating unique rule.