When you set up a new iPhone, you have the option to restore it from a backup. This can be an iCloudbackup or a backup you made on your computer. If you don’t want to lose your data, it’s a good idea to back up your iPhone to iCloud.
To back up your iPhone to iCloud, open the Settings app and tap on your name at the top of the screen. Then tap on iCloud. Scroll down and tap on …