Hi gmtruong,
Thanks for posting in Apple Support Communities! Since your keyboard doesn't seem to be working as expected, try restarting your iPhone. Restarting can fix many issues:
"How to restart your iPhone X, 11, 12, 13, or later
- Press and hold either volume button and the side button until the power-off slider appears.
2. Drag the slider, then wait 30 seconds for your device to turn off. If your device is frozen or unresponsive, force restart your device.
3. 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.
How to restart your iPhone 6, 7, 8, or SE (2nd or 3rd generation)
- Press and hold the side button until the power-off slider appears.
2. Drag the slider, then wait 30 seconds for your device to turn off. If your device is frozen or unresponsive, force restart your device.
3. To turn your device back on, press and hold the side button until you see the Apple logo."
Find these steps in the article Restart your iPhone. It may also help to remove and read the keyboard in Settings > Keyboards.
Cheers!