Be sure to save your files on either Google Drive or One Drive
You can also use iCloud storage to save your files, iCloud Backup is another option.
If your device is lost or broken and files are not saved in the cloud, there might not be a way to recover them. (Image links to a video explaining iCloud)