iOS 18 can perform actions based on any voice command you set, even when your iPhone’s locked
Voice computing is still in its early days, for one reason because voice assistants often aren’t great at understanding our words unless they fit a pre-defined model.
Siri with Apple Intelligence will hopefully be a lot smarter about this, but in case not there’s another iOS 18 feature that should do the trick: Vocal Shortcuts.