The Accessibility preference allows apps to run scripts and system commands to control your Mac. When you turn on Universal Autofill on your Mac, you’re allowing 1Password to access your Mac. 1Password for Mac can then use the macOS accessibility APIs to view all running applications on your Mac so it can identify fields that can be filled, provide relevant autofill suggestions, and securely fill your information.
The Automation preference allows apps to access and control other apps on your Mac. When you turn on automation permissions to let 1Password for Mac fill in Terminal or iTerm2, you’re allowing 1Password to control the terminal app on your Mac. 1Password for Mac can then access your active terminal session TTY so it can identify password fields, provide relevant autofill suggestions, and securely fill your Mac login password in your terminal app.