I read a novel ~10-20 years ago, but it could be written many decades earlier. Since it was so long, I don't remember if it was a standalone book or a novel in a collection. I read a non-English translation.
Do you know what title is it? My hunches would be Lem or Asimov, but I couldn't nail it down, so it's very likely it's a different author.
In a certain planetary system, there lived a race with a very warrior-like attitude. So much so that all their efforts were directed towards fighting their fellow beings. These weren't wars between nations or tribal battles, but battle royales between all individuals (reproduction was heavily safeguarded). And they continued to develop, advancing technology, colonizing neighboring planets, which they immediately militarized: radars, orbital lasers, missile defenses, incredible feats of military prowess.
In the end, only two individuals were left, male and female, on two separate planets. They spent their days sitting in front of dozens of screens, monitoring both their own defense systems and those of the other side. The thought blossomed in one of them that they were the last of their species, and perhaps it was time to initiate negotiations regarding reproduction. Their philosophical contemplations were interrupted by a system alert that one of the enemy satellites had entered a communication shadow or something like that, and for a few seconds their defense was slightly compromised. Since the primary purpose of this race's existence was to eliminate their kin, nuclear missiles were immediately launched, and moments later, not a stone remained on the other side.
A few minutes after this action, the main protagonist - the only remaining representative of their race - passed away in the seat of their command center, seemingly a natural death because of old age. Or perhaps due to a lack of purpose in further living.
The beings were humanoid in the sense that they had legs, arms and heads. But I don't think it was described if they were more similar to humans or Jabba the Hutt (just an example; the story wasn't connected with Star Wars). Earth humans weren't present.