Hello mamapoole59,
We understand that you're being asked to enter your iPhone passcode when you try to autofill a password, and we'd like to go over some information.
You may be asked to enter your iPhone passcode or Apple ID password when enabling iCloud Keychain.
"iCloud protects your information with end-to-end encryption, which provides the highest level of data security. Your data is protected with a key that's made from information unique to your device, and combined with your device passcode, which only you know. No one else can access or read this data, either in transit or storage."
You can find more information about that under the "How does iCloud Keychain protect my information?" part of this page: Set up iCloud Keychain
For more information about automatically filling in passwords, please check out this page: Automatically fill in strong passwords on iPhone
Thanks!