I use Linux. When I want to install a (new) version of Julia, I download the tarball from the official website and untar it in ~/bin. This creates a directory such as julia-1.7.2.
Then, I link to the julia executable: cd ~/bin && ln -s julia-1.7.2/bin/julia. Since ~/bin is my $PATH, I can run julia just by typing julia in any shell. VS Code etc will also find it.
If I want to run a different version of julia, I just update the link or create a new one, for example with ln -s julia164 julia-1.6.4/bin/julia.