I use my iPhone 7 for some time it will started turning on and off

Please help me when I use my iphone 7 for some time it will started turning on and off and if I open the screen it will stop what is the solution

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0

crwdns2942205:01crwdne2942205:0:

Just to clarify, the screen is turning on and off, or the phone is turning on and off?

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

crwdns2934285:0crwdne2934285:0