A flex is a display of something the person is proud of, such as a skill, purchase, or achievement. To flex is to show it off.

“Finishing that race in the rain is a flex.”
It can be praise, a joke, or criticism of bragging. The reaction depends on who is speaking and what is being shown.