
The wget command should work in Jupyter Notebook of VS Code as well since it worked in Google Colab.

The wget command should work in Jupyter Notebook of VS Code as well since it worked in Google Colab.
You need to have wget installed in order to use it. Relying on external command might cause issues like one that you have encountered. If you want your code to be portable, then avoid relying on such command if possible.
Python standard library has function urllib.request.urlretrieve which will download file for you and is easy to use, consider following simple example
from urllib.request import urlretrieve
urlretrieve("https://www.example.com","example.html")
which does download Example Domain page and save it as example.html in current working directory