If you accidently overwrite a file in VS Code (with uncommitted changes…), you might get lucky and find it in VS Code caches.
1
cd ~/Library/Application\ Support/Code
Then look around in in User/History/
If you remember part of the contents, I’d suggest using grep (I prefer rg) to find files with that bit of text:
1
rg -l <TEXT>