
Only two steps are involved.
Step 1
Open a terminal and update the repository list:
sudo apt update
This command will prompt to type y for yes.
Step 2
Enter the command to install Nodejs. This command will prompt you to type y for yes.
sudo apt install nodejs
When done type:
node --version
Should show something like:

node --version command
Bonus
Package manager
They are two package managers you can you. npm or yarn.
Try not to use them interchangeably as they may cause errors in your projects.
Npm comes installed with nodejs as yarn has to be installed separately.
npm install yarn --global
When done type:
yarn --version
Should show something like:

yarn --version
command outputFun fact using npm to install yarn is using a package manager to install a packager manager.
You are all set. Happy Coding🎉
For more follow me on Twitter