You might like to do a force restart of your iPhone using the steps below ( a force restart will not delete any settings or data ).
- On an iPhone 7 or iPhone 7 Plus: Press and hold both the Sleep/Wake and Volume Down buttons for at least ten seconds, until you see the Apple logo.
- On an iPhone 6s and earlier, iPad, or iPod touch: Press and hold both the Sleep/Wake and Home buttons for at least ten seconds, until you see the Apple logo.
Allow your iPhone to reboot then go back to Settings > iTunes & App Store and again try to sign in with your Apple ID details.