That's part of the window regulator. It looks like it came apart and the clip that attaches to the window broke off.
Remove the rest of the window regulator and see if you can reassemble. The slide with the spring will have two springs one on each side of the cable. It looks like the slide didn't break just cable popped out. If it's cracked: broken you can likely repair with JB Weld. The clip that holds to the window looks snapped. That's the part you need.