When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
Roll down the window and use some adhesive on the back of the trim piece
Before doing that, see if you can just pop it back in place. That piece is held in with metal clips. If it wont pop back in place maybe they got bent. That piece popping out isnt uncommon if its ever been off before.