Uinque Set to True in my Mongoose schema Still allows Duplicate Entries

I created a User’s schema in my project using mongoose, with the email field set to unique true, but I still get duplicate entries in mongodb, I found that the database connection options, when using mongoose.connect() have been deprecated, I removed options, yet it still duplicates entries, please I need a solution to fixing this duplicate entry into my database.