I think you may be referencing the US flag code, which yes, has a handful of explicit and implicit prohibitions against wearing the flag on clothing.
What the flag code says about clothing is as irrelevant as any other hot take on the issue.
The "Flag Code" normally refers to 4 U.S.C. § 1 -- which I don't think ever had any penalties for violation. It's simply advisory. The purpose is primarily to define the way the flag is used in an official capacity.