Make sure both iPhones have Wi‑Fi and Bluetooth turned on
Keep both devices close together
Sign in to iCloud on both devices
Save each other as contacts with Apple IDs if needed
On the receiving iPhone, go to Settings > Wi‑Fi and select the network
On the sharing iPhone, wait for the password sharing prompt to appear
Tap Share Password on the sharing iPhone
Tap Done when the password has been shared
