A trie stores shared character prefixes once. Each edge consumes one character, so you can answer a prefix question by walking directly to the node for that prefix. The extra information on a node decides what question the structure answers: a pass count measures occurrences, while a terminal flag records a complete word.
Those states are different. Registering plane creates a path for plan, but it doesn't register plan as a word. In this lesson you build both forms, then use them for shortest routing roots, conflicting labels, and a search that permits exactly one replacement. Say what each node field means before coding. That invariant makes empty prefixes, duplicate insertions, and word endings easier to test.