A single word cannot benefit from copyright protection, but a character can. It may be difficult to argue that Anduril and the Palantíri were characters, and even more difficult to argue that the commercial products named after them were substantially similar. Trademark protection may be more applicable, but the Tolkien estate may not have registered (or defended) trademarks for those two names, and if they did it could be argued that a defense company is not confusable with the original material.
On the other hand, maybe both of those companies did secure a license from the Tolkien Estate.
Not an expert on IP law, so asking genuinely - is the threshold for copyright protection with respect to (unique) names whether the name belongs a character? So, Anduril and Palantir are okay, but Sauron or Aragorn would not be?
It's the character which may enjoy copyright protection, not the word in isolation. So if you write a story about a bad guy named Sauron who likes rings, you may be infringing, but if you launch a new candy bar named Sauron then it might be OK.
“ Upon the announcement of the first Nexus device, the Nexus One, the estate of science fiction author Philip K. Dick claimed that the Nexus One name capitalized on intellectual property from Dick's 1968 novel Do Androids Dream of Electric Sheep? and that the choice of name was a direct reference to the Nexus-6 series of androids in the novel.”
Looks like there was a lawsuit,
that was eventually settled out of court and we don’t know what was agreed.
On the other hand, maybe both of those companies did secure a license from the Tolkien Estate.