In Home Assistant, go to Settings -> Automations & Scenes -> Create Automation. Choose Voice Command as the trigger and set ...
However, Microsoft PowerToys' new feature makes Windows Search irrelevant. It's called Command Palette, and Microsoft should offer this as a built-in Windows feature as soon as possible.