Flex means to bend, as in ‘bending a joint or a limb in your body’. This word is also a slang term that's very popular in rap music. When rappers use flex or flexing, it means they are showing off. The term originates from people flexing their muscles to show off. People can flex in multiple ways, they can show off their money by wearing expensive clothes or driving expensive cars. Though flexing is used mostly when showing off wealth, individuals can also flex to display their power by showing off their muscles or weapons.
Rapper Meek Mill has a song titled “Flexing” in which he says “Spent a 100 racks on my chain, all them hoes know my name - I be flexin, flexin, flexin on these n*ggas”. Meek Mill is pretty much showing off his wealth, hence the reason he says he’s flexing.
Rapper Lil Jay also has a song with fellow Fly Boy Gang member Billionaire Black, in which Billionaire Black says “B*tch,Im the trending topic, All these hoes be after me - Im looking for her,I think I found her - Everything designer - But you know Im flexing”. Again, similar to the above example, Billionaire Black is flexing(showing off) by wearing designer clothes.