Welcome to Apple Support Communities.
If I'm understanding correctly, you are having some trouble powering off your iPhone 7. You should definitely be able to power off your device, and I will be glad to assist.
Try the steps in this article to see if it helps:
Restart your iPhone, iPad, or iPod touch
*With iOS 11 or later, you can turn off your device by going to Settings > General> Shut Down.