When an iPhone freezes very frequently, it could mean that something has gone wrong during an update procedure. But I do not think it's your case.
Test it for a while and, if the issue still repeatedly appears, then it could need a fresh install of the latest iOS.
That could be done making a full backup, then restoring the device to factory settings and, in the end, set it up as new, as per this support guide:--> Restore your iPhone, iPad, or iPod to factory settings - Apple Support
When done, data can be restored from the previously made backup.
Regards
Giulio