QGIS comes with its own Python, but it is missing Tkinter DLLs.
Create a new .bat file to add PYTHONPATH to environment variables. Check if your installation is qgis or qgis-ltr.
C:\OSGeo4W\etc\ini\user.bat
SET PYTHONPATH=%OSGEO4W_ROOT%\apps\qgis\python;%OSGEO4W_ROOT%\apps\qgis\python\plugins
SET PATH=%PATH%;%LOCALAPPDATA%\Programs\Microsoft VS Code
Also, if needed to use TKinter, QGIS' python doesn't come with it, but we can grab files from our Python and copy them to QGIS location.
From %USERPROFILE%\AppData\Local\Programs\Python\Python39\DLLs, copy tcl86t.dll, tk86t.dll, _tkinter.pyd and paste them into C:\OSGeo4W\apps\Python39\DLLs.
C:\OSGeo4W\apps\Python39\DLLs\tcl86t.dll
C:\OSGeo4W\apps\Python39\DLLs\tk86t.dll
C:\OSGeo4W\apps\Python39\DLLs\_tkinter.pyd
C:\OSGeo4W\apps\Python39\DLLs\sqlite3.dll
Also, copy the whole folder %USERPROFILE%\AppData\Local\Programs\Python\Python39\tcl and paste it in C:\OSGeo4W\apps\Python39
C:\OSGeo4W\apps\Python39\tcl
Do not start VSCode from start menu or any shortcut.
First, run C:\OSGeo4W\OSGeo4W.bat so it can open a command prompt with all the environment variables needed, including the newly created user.bat above.
Then, from this command prompt start your VSCode code, it will open VSCode with the OSGeo4W environment variables.