This is probably good advice for life in general. A lot of my worst behavior comes from a feeling of feeling threatened (most of the time, unconsciously) in whatever situation I’m in. I see this in academia a lot, both in myself and in others. Feeling threatened puts me on the defensive, and makes true openness to ideas nearly impossible—which makes it very hard to be a good researcher.
Sometimes threats in life are real. But often, I find my primal threat-detection circuitry going on high alert in situations where I’m in no danger. When I feel one of my ideas is being challenged, for example, I reflexively react as if it’s an attack on my position as a PhD student; as if it is an existential threat to my source of income. In these moments, it’s good to remind yourself what, if anything, is threatened. If someone challenges an idea of yours, it’s unlikely your job and income is threatened. Depending on your research group and advisor, perhaps some amount of status (or even your position in the group) is threatened—though in that case, I’d suggest finding a different group and advisor. It’s unlikely even that your ability to work on your idea is threatened; I’ve worked on many ideas even in the face of skepticism from others (and learned that the skepticism is often valid, but sometimes not!)
When you feel those primal circuits light up, take a moment to identify what the actual threats are!