Why does my phone crash/reboot if volume is above half way.

My iPhone X will reboot/crash if the volume or ringer is over half way. Otherwise functions normal. The phone was recently factory reset and restored. Not sure if I should replace loudspeaker and or lighting/speaker assembly. Any help or comment would be appreciated!

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0