To install multiple npm versions and switch between them, you should use Node Version Manager (nvm)

nvm can be installed by the below commands for a particular user where the commands are run:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

After successful completion, if you want to install a specific Node Js version use the below command:
nvm install 8.9.4

Finally, check npm version using:
npm version

To check node js version:
node -v