MongoDB creates duplicate document everytime hit Save?

I noticed everytime I hit Save in my VSCode, even though newUrl is unchanged, a new document is updated to MongoDB, with a new _id.

Is this behavior normal? Is it by default? Can I change it?

My code is like this:

require("dotenv").config();
const express = require("express");
const app = express();
const cors = require("cors");
const mongoose = require("mongoose");
const {Schema, model} = mongoose;

mongoose.connect(process.env.MONGO_URI, {useNewUrlParser: true, useUnifiedTopology: true});

const urlSchema = new Schema({
	original_url: {
		type: String,
		required: true,
	},
	short_url: Number,
});
const Url = model("url", urlSchema);

// unchanged
//
let newUrl = new Url({
	original_url: "https://www.google.com/",
	short_url: 1,
});
newUrl.save((err, data) => {
	if (err) console.error(err);
});
//
//

app.use(cors());
app.get("/", (req, res) => {
	res.sendFile(`${__dirname}/views/index.html`);
});
app.listen(3000);

If something happens every time you save the document, then I would assume you are using nodemon. However, regardless if you were just using node to start the app, your current code will continue to create the same record with original_url containing https://www.google.com/ and short_url containing 1 each with a new _id because that is what you have written your code to do every time the app runs (or reruns).