If you sync your iPhone with iTunes every once in a while, there’s a strong chance that the last backup that iTunes took of your iPhone has those special messages that you want back. In case you regularly backup your iPhone with iTunes, you probably retrieve deleted text messages
Here is the way you can follow:
1. Connect the iPhone to the computer with a USB cable.
2. Open iTunes.
3. If you have a new or erased iPhone, iTunes will prompt you to restore from backup.
4. Otherwise, Control-click on your iPhone under DEVICES in the left menu.
5. Select Restore From Backup...
6. Choose the backup you wish to sync and click the Restore button.
However, if you have no backup of the messages, you can also recover them with the help of iPhone data recovery. You can have a try!
Read more: how to retrieve deleted text messages on iPhone