How do I restart a Node.js server?

Well, i have a problem with restarting nodemon server, it says that it is restarting but after it no changes in code are applied and it uses old code that doesn’t even exist on my computer anymore.

this is my “server.js” file

const express = require('express');
var fs = require('fs').promises;

const port = 3000;
const app = express();

app.use(express.json());
app.use(express.static('public'));

app.use(function(req, res, next) {
    res.header("X-Content-Type-Options", "nosniff");
    next();
});

app.get('/translations', async (req, res) => {
    try {
        var DeWrdsSrc = await fs.readFile("./zdroje/nemeckaSlova.txt", "utf-8");
        var DeWrds = DeWrdsSrc.split("n");
        res.json({
            message: 'hello'
        });
    } catch (error) {
        console.error('error reading the files:', error.message);
        res.status(500).json({ error: 'error loading the files' });
    }
});


app.get('/users', (req, res) => {
    res.json({
        name1: 'ivan',
        password1: 'PutinIsLove'
    })
});


app.listen(port, () => {
    console.log('hello on port:', port);
})

and this is a code, that is not updating

var inputName = document.getElementById('username');
var inputPswrd = document.getElementById('password');

const LgnButton = document.getElementById('logInButton');
LgnButton.addEventListener('click', ResAPI);

const ResAPI = async (e) => {
    try {
        const res = await fetch('http://localhost:3000/users', {
            method: 'GET'
        });

        if (!res.ok) {
            throw new Error('Chyba při načítání dat z API.');
        }

        const data = await res.json();
        inputPswrd.value = data.name1;
    } catch (error) {
        console.error('Chyba:', error.message);
    }
};


LgnButton.addEventListener('click', ResAPI);


and in web console it says this:

Uncaught TypeError: LgnButton is null
http://localhost:3000/prihlaseni.js:25

I even tried to replace lgnButton for document.getElementById(“logInButton”) but nothing worked.
And killing the terminal in vs code does not restart it unfortunately, not even rs.