On the Mac you can use Dictation Commands to trigger a keyboard shortcut, menu item, or to even insert some text.
You can do this while typing, or while dictating. You can set the spoken phrase to precede a dictation command to make sure the command only executes when you want it to.
From one of my favourite sites that gives many useful hints, the author of the site has posted a video explains the process for using dictation.
Previously I had used Dragon Dictate which is (was) quite sophisticated but this has been now discontinued on the Mac (as far as I am aware), probably as many of its features are just native to the MacOS anyway.
See MacMost - Dictation Commands for a video tutorial.