Wiktionary
shoot oneself in the foot
vb. (context idiomatic English) To act against one's own interests; to unintentionally behave self-destructively.