Samsung Galaxy S7

Solution
Sounds like you need to have it looked at. It could be a something as simple as a connection came loose inside, or it could be a part (or parts) need replacing.