I’m no lawyer, but a company/corporation has to show that they actually use and protect their brand/logo. That is why companies like Apple vigorously defend their Apple logo and they pounce on a company with their lawyers even if they get a sniff of them trying to infringe on their logo. Apple has the capital behind them to protect them, but a small business doesn’t have the luxury.
For registered global tld, it is very difficult to claim a registered one even if you have a trademark on the name.
This is why most larger companies (and companies that hope to become big) register the domains that they plan to use in every tld possible.
In some countries it is easier to claim a registered local tld, assuming you have a trademark or your company name is old enough to be recognized. Though this is only true for some local tld’s, and not all.
In either case, if they are asking for up to a few thousand dollars for the domain, it will be cheaper buying it from them than trying to take it through other means.
Also keep in mind, getting a trademark after the fact, will not always help either.
So if you see someone has X domain, and you decide to get the trademark to take it from them, in this case, they can prove they had the domain prior to you got the trademark, and with that, they will in most cases have a stronger case than you.
Similar, if you have had a company and a trademark for 10 years in USA, and decide to tackle the international market, and get a trademark in country Y, and then decide to claim the domain name that another company is using there. This will in most cases not work, even if you get a trademark due to the other company would have an established brand before you arrived, which means they could challenge your trademark after the fact, or at least keep using their company name and the domain with no worries.
This is the reason that when a large company tackles the international market, they normally purchase the rights to the name they use, from anyone using the same name in the country. Mainly as the other company will have the right of the name in said country, even if your company is significantly older, mainly since their presence has been long in the country.