Can you clarify “hacked” ?
Have you perhaps rooted your phone ?
”Factory data reset will not unroot SAMSUNG J320P Galaxy J3 (2016) nor remove any custom ROM or software changes. If you wish to remove your customed operating system, you can do it by installing another custom operating system (which may include the original one). ”
You may find advice and help on a site called xdadevelopers.
Current Phone ~
Samsung Note 20 Ultra 5G SM-9820 _256Gb SnapDragon 865+
Samsung One Ui 2.5/ Android 10.