Shoot Oneself In The Foot

What does the idiom “Shoot Oneself In The Foot” mean?

Definition:

Do something that damages oneself or one’s own cause

For example:

“Barbara was trying to convince us to expand the marketing campaign. But she shot herself in the foot when she criticized her predecessor.”