Static can be from interference, loose connections, partially broken wires, and shorts.
Start on one end of each involved wire and gently wiggle and twist along the length. See if you can stop the static or make it worse. Do the same around and with the plugs.
Plugs tend to be the source in my experience just by the nature of their design, assembly, and quality.
Look for damaged insulation, bare metal showing, hard kinks/knots. Any possible physical wire or connector problems.
Likewise for the ports being used. Hold the plug as steady as you can to see if the static stops. Or wiggle and move the plug around a bit until the static stops.
Does not take much movement to cause static and many low end priced products the plugs and wires will degrade quickly. And probably were not truly up to the necessary requirements and tolerances to begin with.
If you can narrow down the static source then a fix such as a new plug or splice may or may not be viable