This is all done correclty, however, you made a mistake that occurs for many people. You have the word “words” plural in some places, and singular in others. I hope that makes sense. What you should do is take out all the letter “s” in the word, “word.”
This is not the error. The variable word is just a placeholder for each single word found within the sentence held in variable words. The problem is that the OP has written |word| frequencies["word"]+= 1 - with "word" instead of word, which makes the interpreter take the literal string value "word" instead of the string value contained in the variable word.