Most modern software "phones home" to the developer’s server. The server checks if the key has been used before and if it is blacklisted (stolen or leaked).
Software developers face the constant risk of unauthorised copying and use. A licence key is a common technological measure designed to verify that a copy of the software is legitimate and has been purchased. Without a valid key, most commercial software either refuses to install, runs in a limited "trial mode," or functions only partially. what is a licence key
Software is technically "intellectual property." When you "buy" software, you usually aren't buying the code itself; you are buying a to use that code. The licence key enforces the rules of that purchase. Most modern software "phones home" to the developer’s