I use toggle mute a lot in Discord, especially on devices where I don't use a mic with a hardware mute, but Teams does not, as far as I have checked, have a customizable keybind for toggle mute that doesn't require you to have the application focused. Which is really annoying, especially when in a meeting and getting asked a question while in another window.
Ideally, Windows would give us a customizable keybind to mute your microphone globally. Sadly, that's not the case so you have to get a script to do it.