As @Steveuk has said But also check in the settings. Go to battery and device care Tap on the 3 dots on the top right Go into Automation Is the Auto Restart at set times turned on
I've deleted all apps recently downloaded and it seems to have stopped the issue. No apps were coming up with an issue but the sd card not working may have affected it. Thank you.