Install or update nvm using the official install script.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
Reference: https://github.com/nvm-sh/nvm/blob/master/README.md#install--update-script