Yes, you can restore deleted text messages on your iPhone. You can use the "Recently Deleted" folder within the Messages app to recover messages deleted within the last 30 days.
You can restore messages deleted beyond this period from an iCloud or iTunes/Finder backup. Specialized data recovery software can also help retrieve deleted messages directly from your device's internal storage if no backup is available.