Hi cakewithstrawberries,
Thanks for reaching out to the community. The first step will be to restart the iPhone to correct the issue. If restarting doesn't solve the problem, reach out to Apple directly to have the iPhone serviced/inspected.
- "Press and hold either volume button and the side button until the power-off slider appears.
The volume button is located on the left side of the device, and the side button is located on the right
2.Drag the slider, then wait 30 seconds for your device to turn off. If your device is frozen or unresponsive, force restart your device.
3.To turn your device back on, press and hold the side button (on the right side of your iPhone) until you see the Apple logo".
Restart your iPhone - Apple Support
Contact Apple for support and service - Apple Support
Have a good day.