If you search on Google how to retrieve deleted text messages
on iPhone, you will get a lot of answers. But in most cases, there are 3 ways: restore from iTunes backup, restore from iCloud backup and restore deleted iPhone messages
from iPhone using recovery app. iTunes and iCloud require you to have backup files, while an recovery app does not.