I have the same problem on my 2021 MacBook Pro, Monterey 12.5. So frequent and frustrating, I now routinely compose longer texts in Notes and copy and paste them over - total hassle. It's never happened in other apps or on on my older Macs or other devices. I'll try @PPhilip's suggestions, but am open to others, too.
This goes far beyond Mac's awkward word completion algorithms - as @RobX says, it mangles the text - swapping the order, deleting or repeating text, replacing characters with apostrophes, etc., often several words earlier in the text. Here's an example that just happened:
I had typed this:
I think it’d be great if we could get the tile and gas pipe scheduled for the same day if at all possible. Neither should take a long time. It’s possible there’s enough ‘give’ in the horizontal run of pipe under the house that they just need to undo the hanging brackets
And when I went to add in "drill through the floor," I got as far as "drill" before it turned into this:
I think it’d be great if we could get the tile and gas pipe scheduled for the same day if at all possible. Neither sh’s possible there’s enough ‘give’ in the horizontal run of pipe under the house that they just need to undo the hanging brackets drill ua new ndo the hanging brackets