Node.js on Windows-
Visit the Node.js official website and download and install
Node.js on macOS-
Open terminal and run this command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install node
Node.js on Linux (Ubuntu/Debian)-
Open terminal and run this commands
sudo apt update
sudo apt install nodejs npm
After installing you can check version
node -v
npm -v