you may have a hardware problem
The next step would be to restore your device, and setup the device without restoring a backup, to see if the issue is replicated. I would first make sure you have a backup so your data is saved.
Here is a guide for those steps:
How to back up your iPhone, iPad, and iPod touch
Restore your iPhone, iPad, or iPod to factory settings
and see how it goes
If no improvement send it for repair or replace
If it works well restore from backup but be prepared to wipe again without restore from backup.Â
https://support.apple.com/en-us/HT204184