Your phone is boot-looping and there can be several causes for that.
Has your phone been dropped, damaged, repaired or came into contact with water recently?
Depending on the answer to that question, the first thing to check will probably be the condition of the battery. The iPhone 7 isn't that old so it's unlikely that the battery has failed but it is still the weakest link and needs to be checked. If the battery doesn't solve your problem, then it could be an issue with a main component, such as a screen, sensor, camera which could be causing the device to fail. Lastly, it could be an issue on the logic board itself.
You can try to troubleshoot it yourself but you will need some basic tools and understanding and a willingness to spend money on replacement parts without knowing if it will solve your problem. Start by looking at this guide on how to change a battery just to see if you are comfortable doing this kind of repair. If you are, let me know and I will give you some additional guidance.