Probably a hardware problem; a bad battery or other such.
Battery problems can cause hard shutdowns, for instance.
You can try to back up, reset, and reload, and see if that clears this.
Restore your iPhone, iPad, or iPod to factory settings - Apple Support (includes links to backup and restore)
But you may be headed for repair or (given the age, and given the upcoming iOS 16 doesn’t support iPhone 6s) replacement.
If the reset does not clear this, you can discuss your options and alternatives directly with Apple Support.
Use the Get Support link in the upper right of this webpage.