First of all, check if auto-correct is enabled on your device not. To enable it, navigate to Settings >> Click on General >> Go to Keyboard >> Finally, turn on the toggle for Auto-correction.