Hello KDay18,
Thank you for using Apple Support Communities. We understand how important your messages can be. We’d like to help out and see if we can sort this issue out. If you were not using iCloud to sync your messages, you can recover your missing messages from a backup that you had created during the time you had those messages on your device. Steps on how to locate a backup and how to restore from one, can be found below:
1.) Locate backups of your iPhone, iPad, and iPod touch - Apple Support
2.) Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
Keep in mind that this step will remove all new data that you have on your iPhone. Since you'll be restoring to a specific point in time in the past. If you were using iCloud to sync your messages and you noticed all your messages are missing across your devices. You might want to make sure that iCloud for Messages is turned on:
1.) Go to Settings > [your name].
2.) Tap on iCloud > Show All > Messages.
If this feature is off, this means you were not using iCloud for Messages or it might have turned off. If this feature is turned on and your messages are missing, consider reaching out to Apple Support for help. They might have to investigate this issue further with you. Use this link to reach them: Get Support
Thank you for using Apple Support Communities. Best of luck.