Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
It is possible that the software is glitched. So we can reset your iPhone and see if it works or not. Press and hold down the Power button and Home button at the same time until it shows the Apple logo. When you see the Apple logo, release the buttons and let it boot.
Note : Power button is the button you use to turn off your iPhone or its screen. Home button is the round button at front bottom.
Please let me know if that didn't work, so we can continue troubleshooting.