S6 keeps turning off
Backup your data
Flash last firmware with Odin
Do not install any app


Check it again if turning off happened again, Its hardware relative and you should send it for repair.

I think flash firmware will fix your issue.