This is where people lose libraries, usually a day after wiping the old handset. The reason is structural, and the fix has to happen before the transfer, not after.

A backup covers one space, so several vaults means several files. A restored space opens with the code its backup was made with.
Three mechanisms. The third is the one that catches people.
Settings, Encrypted Backup, Save a Backup. Enter your code, and the app writes one encrypted file. Save it anywhere: a computer, a drive, cloud storage. On the new phone, Restore from a Backup, point it at the file, enter the code it was sealed with.
No server holds a second copy. Lose the phone before making a backup and the photos are gone.
