On your M1 Apple Silicon MacBook Air, the message “Unlock to use accessories” means the Mac is blocking your external USB keyboard until you unlock it. Apple explains this security feature here.
If your trackpad still works, try pressing Option–Command–F5 to open Accessibility Shortcuts.
You can also try pressing the Touch ID button three times quickly. If Accessibility Keyboard is available, use it to enter your password. See Apple’s accessibility instructions.
If neither method works, you could try macOS Recovery, although it may not offer a way around this problem.
Since you’ve already tried the startup options, I wouldn’t keep repeating them.
Avoid erasing or restoring the Mac, as that could put your data at risk.
If you still can’t unlock it, contact Apple Support or an authorized service provider to discuss repairing the built-in keyboard without risking your data.