Check the Recently Deleted folder in Messages if available
Restore from an iCloud backup
Restore from a computer backup using Finder on Mac or iTunes on Windows
Use Messages in iCloud if enabled on your devices
Ask your carrier if text message backups are available
Use a third-party iPhone data recovery tool
Contact Apple Support for help with recovery options
