Was your iP7 recently serviced? (screen, battery, charging port, something else?)
Should be this case, take it back to the repairer and explain your problem.
Shouldn't be this case, read these support guides:
Use Touch ID on iPhone and iPad - Apple Support
or
If Touch ID isn't working on your iPhone or iPad - Apple Support
If you still get no help, have your device inspected at your most convenient Apple Store or Authorized Service Provider: Apple - Find Locations - Location Selector
Regards
Giulio