Yes, you’ve likely engaged your brakes when disconnecting, leaving to brake safety cable in place. Or they can get wrapped around the ball because they are springy, and if you connect them to the trailer or chain they wrap your ball and can get torn. The yellow is a visual indicator, and the brad retains the cable inside the notch (hole), with a C clip. They normally slide through he hole and the clip stops it unless it’s pulled, and the clip is sacrificial. You should have a white card with spare clips in the Owners Satchel.
Odds are your brakes have been engaged. If the cable is missing, then you’ve lost it on your last stop, or prior. It then activates the safety mechanism inside the couplers the brakes have been running with tension on the calipers. That little safety cable can lock up your brakes if they are working properly.
In this case you hope your brakes have a problem and have not been running with the calipers engaged. Because the issue this creates is a problem worse than the brakes not functioning. Read the safety labels on the tongue coupler and see if the tab releases below the coupler. The cable turns inside the coupler and the bind you’ve create in that loop keeps tension on the brakes. That loop, where the cable is pinched, must be free’d. This cable must be replaced and a fresh clip, brad and cable installed.
It happens, it’s not the end of the world and you may have damaged your brake system.
BCB