Where are you saving your Contacts?
ie: Device, SIM, Samsung Account or Google Account?
Open your Contacts & Click on the 3 Dot Menu middle left (yours will look different than mine) & Check to see where your Contacts are being saved.
I'd recommend that you save them to your Google Account.
Don't know what could possibly be happening with your Contacts saved AND Synced with your Google Account. In about a dozen years, I've never lost any of my Contacts.
Are your contacts Syncing with Google?
Go to Settings > Scroll Down to Google & Click on it > Settings for Google Apps & Click on that & Check to see if your Contacts are being Synced.