Step 1. First of all in your windows PC download and install the tool Android Data Recovery.
Step 2. Now you have to enable USB debugging in your android for that you have to go to Settings -> About Phone -> Build Number and tap on it 7-10 times. Now you will see developer option in your settings and tap on it and scroll down and enable USB Debugging
Step 3. Now launch the tool that you installed in your PC and from there select your android version and proceed by connecting your android to your PC via USB cable. Now select the messages at the recovery section and then simply click on next.
Step 4. Now the Android Data Recovery software will ask you to Allow/Grant/ Authorize the access in order to get the privilege to scan SMS data. simply allow it
Step 5. Now after the scan gets completed you will see all the deleted text messages from the android device, click on the items you want to restore and then click on “Recover” button.
That’s it! you are done, now the restoring process will begin and all your messages will get recover.