Doubt is a sign of intelligence. Which can sometimes lead to confidence issues. Just try to keep things in perspective and not let doubt keep you from taking calculated risks. It's when we allow ourselves to become paralyzed that things regress. A lot of it is environment as well so there's no simple answer but I can assure you thet you're not alone.