Make sure that both devices have an active iCloud account. One of them must also be connected to the WiFi network.
A message should appear on the device that’s already logged on, asking whether you want to share the password with the new device.
Tapping on “Share” will transmit the password to the new device. Using this method will mean you won’t have to type or tell anyone your password anymore. – dpa