Activation codes for Need for Speed: Most Wanted should come from a legitimate purchase rather than lists shared online.
When you buy the game from an authorized retailer, the correct code is included with your copy. Codes posted on random sites are often invalid or connected to pirated software, so obtaining yours through official channels is the safest way to install and play without issues.