Decision paralysis
Hamlet has a clear mandate, a named target, and eventually a confession. He spends four acts not acting, and he is more articulate about why than anyone who has ever missed a deadline.
The famous speech is usually read as a meditation on death. It is at least as much a description of what analysis does to action.
He frames it as a genuine choice between enduring and acting, and then never picks. The speech ends by naming its own failure mode: thinking that has become a substitute for doing rather than a preparation for it. Conscience makes cowards, and resolution loses its color the longer you look at it. He knows exactly what is happening to him while it is happening, which does nothing to stop it.
The moment he had it
The clearest evidence is the scene where the obstacle is entirely gone. Claudius is alone, unarmed, kneeling. Hamlet has already confirmed his guilt. He draws.
Now might I do it pat. And now I'll do 't. He has decided, out loud, and then in the same breath finds a reason the timing is imperfect. Killing a man mid-prayer might send him somewhere better, which would make the revenge incomplete. It is not a stupid objection. It is a real theological point, and it is also the single most expensive piece of overthinking in the play, because the window closes and never opens again on those terms.
That would be scanned is the tell. It means this deserves closer examination. It is what people say when they have already decided not to do the thing but have not admitted it yet.
He diagnoses himself and continues anyway
An act later he watches an army march past to fight over a worthless scrap of land, and the contrast is not lost on him.
Looking before and after is the problem stated precisely. The capacity to weigh consequences is the thing that separates him from an animal, and it is also the thing keeping him stationary. He can see that the faculty meant to enable action has become the mechanism preventing it. He names it, resolves to change, and then does not, which will be familiar to anyone who has ever written a very good retrospective.
What finally moves him
Hamlet does eventually kill Claudius, and it is worth noticing how. Not after deliberation. He does it in the final scene, poisoned himself, with minutes to live, when the alternative to acting has stopped existing. The decision that took four acts takes about nine seconds once delay is no longer available.
The play is not saying thinking is bad. Hamlet is right about nearly everything, including the guilt of his uncle, the weakness of his own character, and the theology of the prayer scene. Being right turns out to be almost entirely separate from the question of whether anything happens.