What exactly does the error message say? There's a simple diagnostic in the support section of your Samsung members app you can run.
Does the error occur in Safe Mode? If so, it could be a 3rd party app or customisation causing your issue
To get to Safe Mode - Long press Power button, long press Power off icon, tap Safe mode icon. (When booted into Safe mode, you may need to turn off flight mode as it sometimes enables itself) If the issue is fixed, then you know it's one of your 3rd party apps or customisations that were the culprit. It's up to you to determine which one by a process of elimination.