It means to brag, or show off. For example, "I don’t mean to flex but check out my new designer watch." 

It can also mean that "your flex" is your power move, whether you've earned the right to make one or not. Hence the phrase "weird flex, but OK."

NetLingo Classification: Online Jargon