Search for samsung keyboard and try clearing its data (if you're willing). You'd have to re-adjust your keyboard settings but it's worth a try.
I had this issue on my S9 when One UI first released (One UI 1.0 was a nightmare in it's first release)
Please erase the device cache using steps below. If issue persists, Please update Samsung members app to latest version from galaxy store and send us an error report from the Samsung member’s app -> Beta Feedback -> Error Reports to help us debug the issue.
- Turn off the device.
- Press and hold the Volume Up key and the Side key.
- When the Android logo displays, release both keys.
- An 'Installing system update' message may show briefly before the Android Recovery menu options appear.
- Press the Volume down key several times to highlight Wipe cache partition.
- Press Side key to select.
- Press the Volume down key to highlight Yes, then press the Side key to select.
- When the process is complete, Reboot system now is highlighted.
- Press the Side key to restart the device.
One UI Beta Team