Go and check if there is a backup on your Mac. This is most likely as your Mac will ask you to backup iPhone once connected to it.
To retrieve deleted text messages on iPhone 15 from iTunes backup:
1.Before doing anything, make sure your iPhone has been backed up to iTunes/Finder on your Mac. If you're not sure, check the date of the last backup.
2.Connect your iPhone to your Mac using a USB cable.
3.Open a Finder window. Click on your iPhone under Locations in the Finder sidebar.
4.In the backups section, you'll see a list of backups. Check the date of the backup to make sure you're restoring from the right one.
5.Select the backup that you believe contains the deleted text messages.
6.Click on Restore. iTunes/Finder will begin the process of restoring your iPhone from the selected backup. This will replace the data on your iPhone with the data from the backup.
Once the process is complete, your iPhone will restart. After it syncs with your computer, you should see your deleted text messages restored on the device.