As a person who suffers from generalized anxiety, I can tell you that, in my personal experience, it could be responsible for all of the behavior. Anxiety may cause rigidity, negative thoughts, social awkwardness, and eventually depression. My DS6 also has some moderate anxiety (lovely to wonder if his anxiety was caused by nature or nurture! Probably both).
It's wonderful that you are helping him at a young age when he can develop better coping and social skills.