Chosen Solution

I cracked my screen and after that if i listen to music out loud or put it on speaker phone my phone will just restart, I can make a regular phone call but if my bottom speaker has to be used for something my phone restarts and it’s kinda weird because it works fine occasionally. Don’t know what to do I fixed my screen and still have this problem

It sounds like the audio chip is developing a bad connection to the iPhone’s logic board. Are people you call able to hear you while speakerphone mode is not turned on? And does the speaker phone button during calls become greyed out sometimes? If people can’t hear you during calls and speaker phone does become greyed out then you’ll need to take your phone to a reputable repair shop that does micro-soldering to get it fixed for you. They will need to run a jumper between the audio chip to reinforce the weak solder pads that provide the connection from the board to the chip so that it is a permanent fix.