After using your Apple Mac, iPhone or iPad for more than 2 to 3 years upgrading the operating system multiple times you may realise after upgrading system some features like iCloud, Mac / App Store App Downloads and Updates, Keychain Sync, Safari Passwords Sync, Contacts Sync are not working across devices.
1. If you are on iPhone and iPad first backup your device using Mac. And also backup your iPhone and iPad photos using Apple Photos.
2. If you are on Mac backup your Mac using TimeMachine