A Windows license key is valid for only one device. Your Windows will be automatically associated with your device the moment you activate your license key. This link makes it possible for Microsoft to check whether you previously had an activated version of Windows when you reinstall your device, so that you can also reinstall Windows. You cannot reuse your license key on another device.
An Office license key is valid for only one device. During the installation process you create an Office account. You also enter your license key here. Your license key will then be linked to your Office account.
You can transfer your Office product to another device, provided you uninstall it on the old device. So you can only use your license on one device. You can reinstall your product on another device through your Office / Microsoft accountt.
Note: If you may want to use your license on another device in the future, you will need to create an Office account. Your license key will no longer work with a new installation and your product can only be reinstalled via your Office account!