For Windows - the simple answer is No. You can buy it from anywhere, and activate on any Windows 10 PC. Many a time there are offers in Microsoft Store, but in a different country, and they all work. I have bought the Xbox Live codes from Amazon US because I had to use my affiliate money, and that also worked. So the Windows Key is not locked to any region.

However, this different for Office Products. According to Microsoft, if you see the error message as-

"This product key isn't meant for your region" or "This product couldn't be activated because the product key can only be activated in certain geographic regions,"

it means you purchased it from a different country or region than where you are located.

So the region-locking applies to Office 2019, Office 2016, Office 2013.