Try resetting the game first. A restart clears the temporary state that most often causes codes to be rejected, and the majority of cases are resolved by it. If a code still fails after that, it has likely expired or already been used, since these codes are usually single-use.