For some reason the message app uses AM/PM instead of the 24h clock, even though the system is configured for this.
I see someone else had the same problem, but no replies?
Same on OnePlus Nord (avicii).
But it seems there is a mix-up of the formats: The hours are displayed correctly in the 24-hours format, but an additional āAMā or āPMā is appended: