I have the exact same issue. There was a software update on my S10 last week and since then keyboard deleted all learned words and is not relearning any.
The same issue is described in Czech forum, probably some issue which will be fixed soon?
I found this...It helped me!
Hi everyone, I have managed to find a solution.
I was having the same issue but mine was more severe as it was not showing any word suggestions, no auto correct, no auto punctuation. I was having to type everything out myself. Very annoying.
But I've managed to figure it out. You simply need to reset/restore the app. And the way to do this is to go to the app settings and clear all data.
So go to Settings>General management>Language and input>On-screen keyboard>Samsung keyboard. Click About Samsung keyboard. Now click the i icon in the top right hand corner. Click Storage, at the bottom of the screen you will see 2 options > Clear Data and Clear Cache. You want to click on clear data. Once this is done, your app is now reset/restored. It will now work as normal.
I hope this works for you. Let me know how you get on.