afoul of

afoul of /əˈfaʊləv/ adverb
afoul of
/əˈfaʊləv/
adverb
Britannica Dictionary definition of AFOUL OF

fall/run afoul of

chiefly US
: to get into trouble because of (the law, a rule, etc.)