Hi
Your iPhone may require service. Before contacting Apple, Apple advises following these steps (check after each):
Restart your iPhone (force restarting it only if it cannot be restarted normally):
Restore your iPhone to factory settings, being sure to make a backup first:
If the issue then persists, contact Apple Support (mail-in service may be available, if required), make a Genius Bar reservation or visit an Apple Authorised Service Provider to arrange for your iPhone to be inspected and to establish your available service options: