bash(like you just did) can be unsafe if you do not trust where the command is coming from. Always be careful when copy/pasting commands from the internet!
nvm install YOUR_NODE_VERSIONto install a version of Node. Once it's installed nvm will switch to using the version you installed. You can check by running
nvm ls. You will see a list of all the versions of Node you have installed with nvm. The arrow points the version that you are currently using.
nvm use YOUR_NODE_VERSION.