Updated
Quick fix
Turn on automatic cloud backup (iCloud Backup on iPhone, Google backup on Android), make sure photos are syncing, and check that the last backup date is recent.
Step by step
iPhone: turn on iCloud Backup
Open Settings, tap your name, then iCloud > iCloud Backup, and turn it on. iPhone backs up when it’s charging, locked and on Wi-Fi. Tap Back Up Now for an immediate backup.
Android: turn on Google backup
Open Settings and search for Backup. On many phones it’s under Google or System. Turn on backup to your Google account. Some manufacturers also offer their own backup.
Back up photos and videos
Turn on iCloud Photos, Google Photos or another photo backup. Photos can be stored separately from the device backup.
Check storage space
If your cloud storage is full, backups stop. Free up space or add storage.
Check the last backup date
Look at the backup screen and confirm the last successful backup is recent.
Keep a computer backup too (optional)
You can also back up an iPhone to a Mac (in Finder) or a Windows PC (with Apple’s Apple Devices app or iTunes), which gives you a second copy.
Common questions
Does a backup include my text messages?
It depends on the phone and settings. On iPhone, messages are included in iCloud Backup unless Messages in iCloud is turned on, in which case they sync separately. On Android, Google backup includes text messages on many phones. Check your backup details screen.