Here's how Harry stopped Crouch Jr.:
* He realized the "Moody" he knew wasn't the real Moody. Harry recognized the clues, like Moody's lack of knowledge about some basic Defense Against the Dark Arts spells and his odd behavior.
* He discovered the truth about Crouch Jr.'s disguise. Harry found a bottle of Polyjuice Potion and a lock of Crouch Jr.'s hair, revealing the true identity of the impostor.
* He fought back against Crouch Jr.'s Imperius Curse. Harry used his knowledge of the spell and his determination to resist the curse. He managed to break free from its control.
* He exposed Crouch Jr. to the real Moody. Harry used the Imperius Curse to force Crouch Jr. to reveal his true identity to the real Moody, who then took him into custody.
It was a daring and ultimately successful move that saved Harry and the other students from further danger.