Windows 10's Defender has a live protection mechanism that can slow down some operations. For instance making a search in Visual Studio Code can take a lot longer. You can disable this live protection in the Defender settings temporarily (some hours), before it turns itself back on.