Trademark attorney here. The fact that the other company is in a completely different industry is actually very significant and generally works in your favor. Trademark law is built around the concept of likelihood of confusion, and when two companies operate in entirely different markets, consumer confusion is much less likely.
The key legal framework is the DuPont factors test, which courts use to evaluate trademark disputes. The most important factors are: similarity of the marks, similarity of the goods or services, the channels of trade, and the sophistication of the buyers. If you are selling B2B software and they are running a bakery, the overlap is essentially zero across all of these factors.
That said, there are exceptions. If the other company has a famous mark (think Nike, Apple, Google level), they can invoke dilution claims under the Trademark Dilution Revision Act even across different industries. But this only applies to truly famous marks, not just well-known ones within a niche.
My practical advice: run a trademark search on the USPTO TESS database to see if they have a registered mark. If they do, check the international class numbers. Trademarks are registered in specific classes of goods and services. If your business falls in a different class, you likely have the right to use the same or similar name. Consider filing your own trademark application in your specific class to formalize your rights.