Select the same Wi-Fi network on the second device.
Unlock the device holding the Wi-Fi password you want to share and be sure it is connected to the Wi-Fi network.
Once you have met the above requirements, follow these steps:
The other person’s email address associated with their Apple ID is in their contact information on your iPhone and vice versa.
Personal hotspot is turned off on both devices.
Wi-Fi and Bluetooth are turned on on both devices, and they are nearby.
You have signed in to iCloud on your device.
Both devices are running the latest operating system.
You are sharing your Wi-Fi password from an iPhone to another Apple device.
However, Apple offers a hidden way to share Wi-Fi passwords. You won’t find a Share Wi-Fi password option on your iPhone. How to Share Your Wi-Fi Password from an iPhone
Once done, you will see the Wi-Fi password.
You will be asked to verify your Mac’s password.
Select it from the list of results, and a pop-up will appear showing you the details of the Wi-Fi network.
In Keychain Access, search for the Wi-Fi SSID password you want to know.
Now, on your Mac, open Keychain Access using Spotlight search ( CMD + Space).