know better
To be aware or capable of better or smarter behavior than one has demonstrated. You know better than to talk to strangers! What were you thinking? You know better than to try to question that professor—he doesn't care what we have to say.
know better than
be wise, well-informed, or well-mannered enough to avoid doing something specified. 1989 Anne Fine Goggle-Eyes Inspector McGee knows better than to tangle with Beth's granny.