Hot take: a customer at the paint counter in Dayton told me to pick my trim color second, and I finally got it | Color Theory in Practice - The Design Community Hub
Trim color second is the way to go, that customer gave you solid advice. The main color sets the mood of the room, so picking the trim first is like painting yourself into a corner. You end up stuck trying to find a wall color that plays nice with a trim you already locked in. Do the walls first, live with the samples for a day or two, then match the trim to what's already working. Way less chance you end up hating both colors at the end.