If you need a new license for a different machine, your best options are established third-party software resellers. Where to buy a windows 8.1 product key - Microsoft Learn

Because of this, you must rely on third-party retailers or existing hardware. Below is a guide on where to look and how to ensure you are buying a legitimate license. 1. Check for an Embedded License (Free)

If you are trying to activate Windows 8.1 on a computer that originally came with it, you likely do not need to buy a new key.