Apple has many accessibility features on their devices which help people with disabilities navigate their devices easily.
A feature that's available on the iPhone is the option to use your voice to unlock your iPhone. You can use your voice to enter the passcode and unlock your device.
Here's how to enable it:
Open the Settings app
Under Settings tap Accessibility
Under the label, "Physical and Motor", tap Voice Control
Toggle the switch on next to Voice Control
To test out this feature try to unlock your iPhone using passcode and while on the passcode screen say "Tap 0" or "Tap 4" which will enter those digits in the passcode. Repeat this process for all digits in your passcode.