That "8 minutes ago" label usually means iOS actually held the notification back, rather than the message arriving late. A few settings cause this, so check these in order.
Settings > Focus: if any Focus (Sleep, Work, Do Not Disturb) is on a schedule or set to turn on automatically, alerts get silenced and then show up later.
Settings > Notifications > Scheduled Summary: make sure it is off, or that Messages isn't in the app list.
Settings > Notifications > Messages: set it to Deliver Immediately rather than Deliver Quietly, and make sure Time Sensitive Notifications is on.
Settings > Battery: turn off Low Power Mode, which pauses background activity and can delay alerts.
If it still happens, try Settings > General > Transfer or Reset iPhone > Reset > Reset Network Settings (you'll need to rejoin Wi-Fi networks afterwards). Apple's guide to notification settings is here: https://support.apple.com/guide/iphone/change-notification-settings-iph7c3d96bab/ios
Does the delay only happen with Messages, or with other apps too? That would help narrow it down.