There are a few ways to tackle this, but the short answer is yes.
If you’ve got a mic you already like, you may only need to adjust the position. Try to move it so the target pickup area (ideally where you mouth is) doesn’t include your keyboard, and if you can, move the mic off your desk (or whatever surface you’re typing on). This will cut down on any vibration sounds from typing coming through over the microphone.
After making those adjustments, it may be worth kicking the sensitivity down a bit. Software like OBS, Discord, and even just the Windows microphone settings will have options for this. The bottom line is, your voice is probably louder than the clacking of your keyboard, so finding the right threshold between your spoken volume and the sounds of your accessories really just takes tinkering.
Plenty of microphones have noise rejection features, too. Most decent gaming headsets (including the ones we linked in this post) will handle this kind of noise pretty ably, as will microphones like the Elgato Wave:3 and HyperX Quadcast S.