What do you mean? Like muting the entire application so no sound comes from Teams or muting yourself while on a call? For the latter, I thought 'Option + Space' worked (or used to)?
Hmm, I don't have teams installed on my Mac, so I cannot be of much help, but I do have a potential solution for you.
Is completely muting your mic sufficient? If so, I have an Applescript solution that seems to work if you want it. I tested it in VoiceMemos and it worked even if I was in a different app in a different space. You can bind the script to a global hotkey very easily via many different apps like Alfred, Karabiner, etc..