Hi,
Yes, it's legal. In this case, everything is fine as long as you're not breaking the EULA by making modifications using third-party software, provided it's not related to the closed-source code of Windows itself.
Here's an explanation: https://support.microsoft.com/en-us/office/microsoft-software-license-terms-5476247d-05e5-4ac7-b77c-1b8cd229e91a#:~:text=Third%20Party%20Software.,extent%20allowed%20by%20applicable%20law.
It's like using malicious software to illegally activate native Microsoft software.
In your case, the problem would be a security issue. You have to be careful when using software that modifies Windows, as this can cause your PC to stop working or corrupt Windows because it can modify the registry and system files.
You can check in the Microsoft Store that there are customization software that have been verified and are safer because the software is verified.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable email notifications if you want to receive the related email notification for this thread.
Thanks