iPhone shuts down when earphones are plugged in
My iPhone XS Max (ios 16.0) automatically shuts off when I plug in my earphones. When I unplug it, the screen shows the apple logo and it turns on again and then immediately shuts off every time I try to plug the earphones back. The charger works when I use it and only shuts off when its the earphones. I bought the earphones two months ago at the apple store and have never experienced this issue until now. I hope someone can help me.