Your social environment can significantly affect your general mood and demeanor. This sounds like a pretty obvious statement when you read it, but it’s surprising how it happens without notice. I was convinced I was an introverted cynic for years, and a misanthrope at heart. Turns out I just really hated my job, and it was making me a miserable person outside of work. It has taken me two years to really heal from that, and it turns out I have the natural capacity to be kind, welcoming, and social. It surprised me when starting a new hobby that I not only enjoyed the community that came with it, but that I sought out genuine community and felt energized by it.
The lesson here, I think, is to not surround yourself with grumpy assholes, lest you become one without even intending to.