A. Check your iPhone settings by going to Settings > General > Keyboard. Ensure that 'Auto-Correction' is turned on. If it is already on, try toggling it off and then back on to reset the feature.
B. Consider using a third-party keyboard app from the App Store that includes auto-correct features, such as Gboard or SwiftKey.