This. I also wished we learned more about this in my CS degree college classes. Luckily, there is pretty good podcast series that helped me structure team leadership, management and other non technical skills. It is called: Manager tools.
Here is the list of all topics on politics [1] with intro to 101 series saying this:
"Your organization is MUCH more political than most of us realize. For those who know it's political, some say, I'm not going to play that game. Either state of being - not seeing the politics, or ignoring them, is unfortunate. Professional Life is HUMAN life, and that means it's emotional, and therefore political. Engineers, software designers, technical people take note: hate those marketing and sales people all you want, but they're gonna end up being your boss unless you recognize the value of political, or put differently, non-rational, decision making."
I highly recommend this series at least.
[1] https://www.manager-tools.com/map-universe/politics#