January 31, 2020
You can tap on the backup of your iPhone to find out when it was last backed up before you erased the messages. You'll see a list of backups for your devices.
This is where it gets irritating. It will be necessary for you to restore your iPhone from an iCloud backup when you reset it to factory settings and start over. Keep in mind that all of your data from the period following the backup will be lost, so hopefully those texts are truly crucial!
You can use Finder to back up your iPhone to your Mac if you don't want to rely on automated iCloud backups or don't have enough iCloud storage space for them. Similar to the iCloud approach, this calls for backing up your phone before erasing the message and then restoring from that backup.
Everything that came after the backup will be lost. Therefore, export any current files you wish to save and store them separately. Link your iPhone to the computer or Mac that has the backup file(s). Open iTunes on a PC, or Finder on a Mac. An iPhone icon ought to show up in iTunes' upper left corner. Choose it. Choose your device from the menu bar on the left in Finder. Select Restore Backup now. This option is located on the General tab of Finder.
Bear in mind that none of these methods are foolproof. If you don’t have a backup you can restore from before the time you deleted your text message, there’s only a very slim possibility of ever getting it back.