update -phone kept restarting again , found that the issue is with device care , so got to device care and uninstall updates , this will keep the device un optimised , also got to samsung store and disable auto matic updates as you can get it from p...
followed this thread for the past 3 months and tried everything , uninstalled third party apps ,cleared cache ,turned auto optimization off ,checked the app which turned on as soon as the restart was done and removed permission to change the settings...