The only way to retrieve deleted messages is to erase your device and restore it from a backup that was made prior to the time you deleted the messages:
How to erase your iOS device - Apple Support
Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
Be aware that this will restore your device to the exact place it was at the time you made the backup. Any changes made since that point in time would be overwritten.
Best,
GB