Hello, Poquito15.
That's unexpected behavior and we'd like to help. If you have not done so already, please make sure to restart your iPhone by following these steps: Restart your iPhone - Apple Support.
"How to restart your iPhone X, 11, 12, or 13
- Press and hold either volume button and the side button until the power-off slider appears.
- Drag the slider, then wait 30 seconds for your device to turn off. If your device is frozen or unresponsive, force restart your device.
- 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."
Test this behavior out by using Dictation in another app besides Messages. Also try toggling Dictation off and back on under Settings > General > Keyboards > Enable Dictation.
Let us know if we can help with anything else at all or if this doesn't settle your issue. Thanks and have a fabulous day!