"Why would anybody want to be the enemy of the global superpower?"
In the case of both the Balkan wars and the invasion of Ukraine, it was because staying friends with the global superpower meant that one wouldn’t get control of the lands one claimed.