If a Mac user wants to view a saved Wi-Fi password, they can do this quite easily via the Keychain app. Related: How To Easily Share Website & App Logins On iPhone, iPad & Mac
Once a Mac user has signed in to iCloud on their computer, they can access their Keychain passwords on other Apple devices as well. Keychain Access is linked with iCloud Keychain. Since Keychain acts as a password manager, users can set up complicated passwords which are difficult for hackers to crack. When entering a password for a network, website, or email account, a Mac may prompt users to save the details in Keychain. The app stores all usernames and passwords entered on a Mac so that users don't have to remember the login details.
On macOS, all saved passwords are stored in a handy application called Keychain Access.