know better (than to do something) idiom
C2 明事理(而不至于做某事)
to be wise or moral enough not to do something
Sure, she's only six, but she's old enough to know better than to run off without us. 当然,她只有6岁,但也该知道不能离开我们乱跑。
I'm surprised at you behaving so badly - you ought to/should know better. 你表现这么差我很惊讶——你该学乖一点儿。