Chosen Solution

Everytime I plug in my headphones my phone starts messing up raising and lowering the volume back and forth. It’s been doing this all the time and I can’t understand why. But when I don’t have any headphones in it’s calm and works fine. So etimes it evens exits out the window I’m in and freezes completely. It turns off my music until I go back and turn it on. It acts nuts.

This sounds like an issue with the wiring in your headphones. Modern headsets can control volume and some other functions, and damage to them can cause issues like you’re describing. Your best bet would be to replace the wire from your headset if you can, or to buy a new pair.