Might be helpful to check if you are running the right version of python with vscode.
In short- you might have different versions of python installed on your pc, installed by you or some other work environments(vscode might have installed one for you). You can see the current running version on the bottom left the bottom left of your vscode window(given that you are running the ms-python.python
extesnion).
If it is not the appropriate version, you can easily change it by pressing on the text of the version, see below picture:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…