Too much speed and/or trailer not balanced properly. Then incorrect emergency sway mitigation procedure. Like on an airplane pilot memory item, there isn’t time to look up what to do when it happens. Immediately activate the trailer brakes only. Practice this so you can do it without looking.