iCloud Keychain can remember credit card numbers and passwords (including WiFi passwords) for you and sync them across your Apple devices. Keychain can also make signing into websites and accounts easier by automatically filling in user names and passwords. You should have strong passwords for all your accounts, and they should all be unique. Use Keychain to manage your passwords and be safer online. Go to Settings > [Apple ID] > iCloud > Passwords and Keychain, toggle Keychain on, and follow the onscreen instructions.
When you visit a login portal on a website in Safari, Keychain will offer to fill in the password for you. Tap Use [your username], and you’re done!
When you visit a website and sign in with an existing or new account with a password, Keychain will offer to save it for you.
Your device will only save passwords if you have passcode security set up. Your passwords are then encrypted for safety.