The trim is only hanging from some flimsy nails, which might not even have hit anything solid to anchor into.
Add a few stainless screws near the ends.
Drill pilot holes first, and you can feel if you are hitting good wood, or are just drilling into thin garbage.
Also, in winter, the trim can freeze to the garage door, and when the door is operated it can yank the trim loose.