November 2024 update
I'm on mac M1 Chip and after trying different solutions; deleting the python and pylance extensions, clearing the vs code cache, deleting and reinstalling vs code, I finally solved it by deleting old python versions that I was no longer using pyenv uninstall {python_version}