You should go into Settings - iCloud, select Backup and turn the slider to on for "iCloud Backup". Put it on a charger and choose backup up now.
Once you have secured a backup then take the phone to an Apple Store for a repair estimate. Your phone obviously has hardware issues that we can't solve in a user forum.