To retrieve deleted messages from your iPhone without iCloud, use an iTunes or Finder backup:
Connect your iPhone to your computer.
Open iTunes (for macOS Mojave and earlier) or Finder (Catalina and later).
Select your device.
Click "Restore Backup."
Choose a relevant backup and follow the prompts to restore your iPhone.
This will replace your current data with the backup, including the deleted messages.