Installing node js and npm on both windows and wsl2-ubuntu

I currently already have node js and npm installed on windows 10. Ive used it to download and install a few packages. It seems npm is not a command recognized by the wsl terminal. Do i have to install node and npm (through nvm) again? Will this new installation conflict with the existing files?

Yes, you need to (mostly) treat WSL as a separate machine. The file system is connected, but applications which run on x86 Windows, do not necessarily run on Linux/Debian based systems. In order to keep as much parity between Linux and WSL, Microsoft did a bang-up job of replicating the behaviour within WSL.

All this to say: You need to use apt or similar to install the software on WSL, and the package will in no way affect your Windows software.

This has been my experience of it, anyway.