Apple has a Temporary iCloud Backup for switching to a new device:
"You have 21 days to restore your temporary backup to your new iPhone or iPad before your temporary iCloud storage expires and your backup is permanently deleted.” You can get an extension yourself and then further extensions by talking to Apple Support.
As to the phone to phone transfer, it’s called Quick Start:
I’m guessing it would be the same as from an iCloud Backup, but it’s not obvious. I’ve done the Quick Start with iPads and iPhones and it worked really well.
Cheers,
Dave