On your iPhone or iPad, open Settings
Tap your name
Tap iCloud
Turn on Messages if it is not already enabled
Open the Messages app
Sign in with the same Apple ID used for iCloud
Wait for messages to sync
On a Mac, open Messages
Sign in with the same Apple ID
Enable Messages in iCloud in Messages settings
Open iCloud.com in a web browser
Sign in with your Apple ID
Check whether Messages access is available for your account
Restore your device from an iCloud backup if the texts were deleted and not synced
Use the same Apple ID on all devices to retrieve synced texts
