That looks like part of the window regulator, the mechanism that moves the window up and down. It's probably just off the track or not lined up right because the glass used to keep it in line from side to side. Like I said, I haven't messed with the regulators on these trucks but many others here have. You can try googling "window regulator ( or window glass) replacement 2006 Yukon" or similar and look for YouTube videos. Or hopefully someone here will chime in. I would assume that since it was hit from the outside with a lot of force, it shoved it out of the tracks.