Iphones dhould be on charge and on wi-fi all night every night.
but I don't think it is relevant. The fact there is no presented solution suggests it is a local iphone issue.
Next steps...
Backup, restore to factory, maybe set up without restoring backup and test at that point,, then restore from the backup:-
(If the phone needs attention you will have to do this anyway)
If you can import your media to Photos or iTunes in a computer and copy important documents to a cloud server it will give you some resilience in case the restore from backup fails, or you need to ditch the backup and start as new.
See here for the resources you need. Allow a couple of hours:
(1) How to back up your iPhone, iPad, and iPod touch - Apple Support
(2) Restore your iPhone, iPad, or iPod to factory settings - Apple Support
(3) Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
If the problem remains then do step (2) again but set up as new without restoring any backup. Install only essential messaging apps
If it fixes it then it is probably a rogue app or setting.