This is a known problem with the iPhone 7. Bring it to the Apple Store. They gave me a new iPhone 7 to replace my old defective one.
open