Try to force a restart by following the instructions in link below:
https://support.apple.com/guide/iphone/force-restart-iphone-iph8903c3ee6/ios
If this doesn't work, then your phone needs to be connected to a computer with iTunes on it. Once the phone is connected and iTunes is open, repeat the force restart procedure and make sure you hold the power button until your phone is in recovery mode and iTunes recognizes your phon. You will be given the option to restore or update. Try update first as restore will reset your phone completely and you will use all data, but you will be able to restore from a recent backup.