Hi, I am Dave, I will help you with this.
If Windows came pre-installed on the laptop you are resetting, then the Windows licence is stored on a chip on the motherboard of the laptop, Windows will automatically activate any time it is re-installed and you can safely remove the device from your Microsoft account after you reset Windows.