Hello bobby0928,
If you haven't already done so, let's use the steps below to restart your iPhone:
1. Press and hold either volume button and the side button until the power-off slider appears.
2. Drag the slider, then wait 30 seconds for your device to turn off. If your device is frozen or unresponsive, force restart your device.
3. To turn your device back on, press and hold the side button (on the right side of your iPhone) until you see the Apple logo.
You can also find those steps in this resource: Restart your iPhone - Apple Support Restarting can sometimes help address odd behaviors.
Additionally, you can use the steps below to make sure those messages weren't accidentally deleted: Recover deleted messages on iPhone - Apple Support
1. In the Messages conversation list, do one of the following:
• Tap Edit in the top-left corner, then tap Show Recently Deleted.
• Tap Filters in the top-left corner, then tap Recently Deleted.
2. If you’re in a conversation, tap
to return to the conversation list.
3. Select the conversations whose messages you want to restore, then tap Recover.
4. Tap Recover Messages.
Should those prior messages still not appear, do you use iCloud to sync your messages between your devices? Set up iCloud for Messages on all your devices - Apple Support If so, are those messages also missing on your other devices?
Let us know, and we'll keep moving forward from there.