To share the Wi-Fi password with a Mac, simply ensure the email addresses associated with your respected iCloud accounts are saved to the Contacts apps on your iPhone and your Mac.  Instead of going to your Settings, open System Preferences on your Mac and go to the Network settings.