I am not a lawyer, I'm certainly not the lawyer of anyone reading this. But I'm comfortable that licensing of boxed versions are transferrable to newer/replacement hardware based on the following parts of the Microsoft License Terms found here: https://www.microsoft.com/en-us/useterms/
Windows 10:
https://www.microsoft.com/en-us/Useterms/Retail/Windows/10/Useterms_Retail_Windows_10_English.htm
4b. Stand-alone software. If you acquired the software as stand-alone software (and also if you upgraded from software you acquired as stand-alone software), you may transfer the software to another device that belongs to you. You may also transfer the software to a device owned by someone else if (i) you are the first licensed user of the software and (ii) the new user agrees to the terms of this agreement. You may use the backup copy we allow you to make or the media that the software came on to transfer the software. Every time you transfer the software to a new device, you must remove the software from the prior device. You may not transfer the software to share licenses between devices.
Windows 11:
https://www.microsoft.com/en-us/UseTerms/Retail/Windows/11/UseTerms_Retail_Windows_11_English.htm
b. Stand-alone software. If you acquired the software as stand-alone software (and also if you upgraded from software you acquired as stand-alone software), you may transfer the software to another device that belongs to you. You may also transfer the software to a device owned by someone else if (i) you are the first licensed user of the software and (ii) the new user agrees to the terms of this agreement. You may use the backup copy we allow you to make or the media that the software came on to transfer the software. Every time you transfer the software to a new device, you must remove the software from the prior device. You may not transfer the software to share licenses between devices.
Windows Server 2012:
http://download.microsoft.com/Documents/UseTerms/Windows%20Server_2012%20Datacenter_English_97974250-7a55-4236-bde8-546f0cec9c85.pdf
2c. Assigning the Required Number of Licenses to the Server.
· Initial Assignment. After you determine the number of software licenses you need for a
server, you must assign that number of software licenses to that server. That server is the
licensed server for all of those licenses. You may not assign the same license to more than
one server. A hardware partition or blade is considered to be a separate server.
· Reassignment. You may reassign a software license, but not on a short-term basis (i.e.,
not within 90 days of the last assignment). You may reassign a software license sooner if you
retire the licensed server due to permanent hardware failure. If you reassign a license, the
server to which you reassign the license becomes the new licensed server for that license.
Windows Server 2016:
https://www.microsoft.com/en-us/UseTerms/Retail/WindowsServer2016/DatacenterAndStandard/UseTerms_Retail_WindowsServer2016_DatacenterAndStandard_English.htm
2c. Assigning the Required Number of Licenses to the Server
· Initial Assignment. After you determine the number of core licenses you need for a server, you must assign that number of core licenses to that server. That server is the licensed server for all of those licenses. You may not assign the same core licenses to more than one server. A hardware partition or blade is considered to be a separate server.
· Reassignment. You may reassign core licenses, but not within 90 days of the last assignment. You may reassign core licenses sooner if you retire the licensed server due to permanent hardware failure. If you reassign core licenses, the server to which you reassign the licenses becomes the new licensed server for those core licenses. You may need additional core licenses to cover all of the physical cores in the new server.
Windows Server 2019:
https://www.microsoft.com/en-us/UseTerms/Retail/WindowsServer2019/DatacenterAndStandard/Useterms_Retail_WindowsServer2019_DatacenterAndStandard_English.htm
C ii. Microsoft. If you obtained the software from Microsoft ****(not via a manufacturer or installer)****:
(a)Initial Assignment. After you determine the number of core licenses you need for a server, you must assign that number of core licenses to that server. That server is the licensed server for all of those licenses. You may not assign the same core licenses to more than one server at the same time.
(b) Reassignment. You may reassign core licenses, but not within 90 days of the last assignment. You may reassign core licenses sooner if you retire the licensed server due to permanent hardware failure. If you reassign core licenses, the server to which you reassign the licenses becomes the new licensed server for those core licenses. You may need additional core licenses to cover all of the physical cores in the new server.
Windows Server 2022:
https://www.microsoft.com/en-us/UseTerms/Retail/WindowsServer2022/DatacenterAndStandard/UseTerms_Retail_WindowsServer2022_DatacenterAndStandard_English.htm
C ii. Microsoft. If you obtained the software from Microsoft ****(not via a manufacturer or installer)****:
(a) Initial Assignment. After you determine the number of core licenses you need for a server, you must assign that number of core licenses to that server. That server is the licensed server for all of those licenses. You may not assign the same core licenses to more than one server at the same time.
(b) Reassignment. You may reassign core licenses, but not within 90 days of the last assignment. You may reassign core licenses sooner if you retire the licensed server due to permanent hardware failure. If you reassign core licenses, the server to which you reassign the licenses becomes the new licensed server for those core licenses. You may need additional core licenses to cover all of the physical cores in the new server.