Some fast commands are below. The complete documentation (including other platforms) is here
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt install nodejs
brew update
brew install node@12
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo yum install nodejs