How to fix Samsung galaxy S7 freezing issue?

A

AC Question

Hello can someone help me. I have a samsung galaxy s7 and a few weeks back it started freezing randomly and sometimes rebooting. Right now I cant even use my phone since when I turn on the phone it freezes after 2 minutes then I would hard reset it and turn it on again and it still freezes. Even when I turn it off and charge it, still freezes. I tried everything. Factory data reset, remove the SD card and etc. Please can someone help me. I desperately need some help here since I dont have the receipt because I purchased it as a second hand unit.