There are many factors that affect your ability to be confident. Whether it’s your thinking process, your behaviour, your understanding of yourself, etc, they can undermine your ability to gain & maintain your self- confidence. Some elements may seem obvious and others may not.
Obviously, the more things you are doing to undermine your self-confidence and the more often you do them, will determine how bad your overall confidence is.