Node.js is a javascript engine that runs on your computer without a browser window. It is widely used for developing backend systems for web sites and development tools.

There are installable packages for macOS on the website.

There is also a Homebrew package called 'node'.

You can find many packages on the website of the package manager.