Oh, hmm. Perhaps the list has been changed multiple times? It was originally 12972 words (see https://www.poirrier.ca/notes/wordle-optimal/) and was 10638 words as of yesterday. Anyway, some of the words that have been removed are slurs/profanity.
So the 10638 words are the set of all possible guesses minus the set of all the solutions.