It's easy to sue; it's harder to win.
So my kids used to ask me "hey dad can you sue someone for ____".
I had a stock answer they asked me so much - all it takes to sue someone is a piece of paper and a filing fee. What matters though is if you can sue and win. (which is exactly
@Bear of Bad News point - I'm just expanding on it).
As a billion dollar entity the NHL can probably throw it's weight around and sue individuals or small companies into oblivion no matter what the merit of its legal argument. The Stanley brand (which is owned by an even larger company) is worth hundreds of millions, if not billions, or dollars, so will have lawyers of it's own.
This kind of trademark dispute comes up all the time. Either two small, regional companies use a similar trademark, or two large companies in different areas use a similar trademark.
I can think of three examples off the top of my head. First a Canadian example - The Brick FIne Furniture (TBFF) was a small Winnipeg-based furniture company that had operated for over 100 years. The Brick was a furniture chain that started in Edmonton then expanded nation wide about 50 years ago. The Brick sued The Brick Fine Furniture - and lost. TBFF was there first, at least in Manitoba. However TBFF was to be careful to use its full name at all times, in order to avoid confusion.
Second example - Apple. Apple Records was a recording company started by the Beatles back in the 1960s. Apple Computer was started by Jobs/Wozniak in the 1970s. They mostly stayed in their own lanes for decades, but when Apple Computers started to get into online music (think iPod and iTunes) the two companies came into conflict. I don't know if it ever came to lawsuits, but both came to an agreement about the use of their respective trademarks.
Third example - WWF. There was both the World Wildlife Fund (later the Worldwide Fund for Nature), and also the World Wrestling Federation. Both used the acronym "WWF". At some point in the 1980s they came to an agreement between the two parties about how each could use the acronym and letters. Now what happened here is that the wrestling people changed their logo, which actually violated the contract between the two WWFs, the wildlife people sued, and as a result the wrestling people wound up having to rebrand as WWE. But note this was a contract breach - trademark law by itself would have allowed both to continue to call themselves "WWF".
The fundamental purpose of trademark law is to prevent consumer confusion. If there is already a well-established brand you can't start up a new company to try and cause confusion. If you tried to start a search engine in 2024 called "Goggle" you'd be sued into oblivion. But if there are two different trademarks, in two different areas of business (and in particular if they started up at roughly the same time period) both are entitled to their respective trademark in their respective fields.
As an aside - this is why you see a lot of compaies coming up with made-up names for either their products, or even their companies. A word like "Stanley" or "Apple" are relatively common, and any trademark protection you get is relatively narrow as a result. But if you come up with a brand new word like, say, Ozempic - you can control the entire word.