I was really frustrated when using <cmd>+<click> in Visual Studio Code was jumping to the TypeScript definition instead of the source definition since the TypeScript definition isn't very useful to me and I don't even use TypeScript. I found this and many related issues:

cmd+click skip typescript definition and go to source? · Issue #68782 · microsoft/vscode
When I cmd+click on an entity it is supposed to go to the definition of that entity. When said entity is an npm installed module it will go to the source code of that module within node_modules iff...

But unfortunately I couldn't find a solution in any of the issues and the moderator bot had closed and locked all of them. Luckily one of the issues sent me down a rabbit hole where I eventually found the setting typescript.disableAutomaticTypeAcquisition. Setting that to false (or checking it in the UI) and running rm node_modules && yarn fixed the issue. I presume this means that VS Code is no longer automatically downloading TypeScript definitions to my node_modules and so when you "Go to definition" it goes to the source file instead of the TypeScript definition. It's both frustrating and understandable that this was the default behavior to begin with, but I'm just happy that it now works as I expect it to.