This one is really simple.
First we will update our system, and then install Node, npm, nvm:
sudo apt update
sudo apt install nodejs -y
sudo apt install npm -y
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.nvm/nvm.sh
nvm list-remote
Choose the one you want, for example type:
nvm install v18.20.3
And thats it!