Greetings Lawnboy42,
Welcome to Apple Support Communities. Are you using the native Apple keyboards on the iPhone? If so, does this issue persist after restarting the device? Follow the steps from the Apple Support article to do so: Restart your iPhone - Apple Support
How to restart your iPhone X, 11, 12, 13, or later
1. 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)
1. 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.
How to restart your iPhone SE (1st generation), 5, or earlier
1. Press and hold the top 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 top button until you see the Apple logo.
You also want to make sure that the software is current on the iPhone. The guidance needed is found here: Update your iPhone or iPad - Apple Support
Update your iPhone or iPad wirelessly
1. Back up your device using iCloud or your computer.
2. Plug your device into power and connect to the internet with Wi-Fi.
3. Go to Settings > General, then tap Software Update.
4. If you see more than one software update option available, choose the one that you want to install.
5. Tap Install Now. If you see Download and Install instead, tap it to download the update, enter your passcode, then tap Install Now. If you don't know your passcode, learn what to do.
Let us know if this helps you.
Best regards!