In short, one can have multiple python interpreters. Each with their own environments - this means i.e. different installed packages, which will be visible only for python and environment in which it was installed. Just like tkcalendar in here.
As far as preventing this from happening, other than making sure code is run with correct python, there isn’t really much to do. However it might be a good idea to get into habit of making separate environment for each project and configure VS Code to use appropriate one for certain project. With creating virtual environments can help build-in venv python module https://docs.python.org/3.8/library/venv.html
PS means that it is Windows PowerShell.