It is the “Inline Text Prediction”.
Use predictive text on iPhone - Apple Support
There is no separate setting to turn just it off right now (iOS 17.0.3) and no idea on if that is something that will come later. It is turned off when you turn off predictive text. Otherwise, you reject the prediction if you keep typing (problematic if you wanted a shorten version of the word but clicking the space bar accepts the inline prediction UNLESS you add them in Text Replacement in settings.
Have a word or phrase you use and don’t want it corrected?
- Go to Settings
> General > Keyboard, then tap Text Replacement. - Tap
at the top right, then enter your word or phrase in the Phrase field, but leave the Shortcut field blank.
That might be a helpful workaround for some