Deleted iPhone messages are stored in the "Recently Deleted" folder within the Messages app. This folder retains deleted messages for up to 30 days before permanently erasing them from the device's storage.
To access this folder,
Open the Messages app.
Tap "Edit" in the top-left corner of the conversation list.
Select "Show Recently Deleted."
Restore any messages deleted within the last 30 days.