What does "Update Node Packages" really do?

NodeJS + Docker

Does this function checks via npm latest version of packages listed in package.json - writes latest version in package.json and then downloaded them or something even different?

Why I'm asking is - Should I run it on each Target or running it on DEV and then just DEPLOY to PROD will be enough?

I assume it does npm update:

Yes, if using Docker deployment. If using cPanel you need to click npm install button on cPanel