There are several methods and tools available online for activating Windows, but it's crucial to use legitimate methods:
The activation is permanent until you change your motherboard or CPU. However, you are still using an unlicensed copy legally. Microsoft can (and occasionally does) revert these activations via a Windows Update. It’s a game of whack-a-mole.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform] "SkipRearm"=dword:00000001
The discussion around these 2022 GitHub texts is not black and white. Many IT professionals and students used MAS not to avoid paying for Windows (as Windows is technically free to install, just watermarked), but to remove the "Activate Windows" watermark without paying for a Pro license for a virtual machine.