If you still have the old phone then take a new encrypted backup and restore that onto the new phone, passwords (wifi, email accounts, Safari) are not stored in an unencrypted backup for restoring onto a different device : Create and delete iPhone, iPad, and iPod touch backups in iTunes - Apple Support
Keychain. (Includes email account passwords, Wi-Fi passwords, and passwords you enter into websites and some apps.)
If you encrypt the backup, you can transfer the keychain information to a new device. With an unencrypted backup, you can restore the keychain only to the same iOS device. If you're restoring to a new device with an unencrypted backup, you'll need to enter these passwords again.
You can turn off encryption after restoring - or leave it enabled and remember the password that you use for it, if you forget the password you won't be able to restore to the backup or turn encryption off