The original spelling of clue was C-L-E-W, and its forgotten meaning is a “ball of yam or string.”
A clew of string was unraveled as a guide out after entering an unfamiliar maze or a cave.
If you became lost, all you had to do was follow the string back to the point of origin.
In the modern cliché, if someone “doesn’t have a clue,” he is in the dark with no idea how to get out of his dilemma.