The enemies saw the city, but what truly struck them wasn't just stone and mortar. It was something far more potent.
The psalm emphasizes that the enemies' reaction wasn't solely based on the physical appearance or defenses of Jerusalem. They marveled and were troubled because they recognized the 'wonderful works wrought by God' (Poole) on their behalf. It was a divine intervention, a display of God's power, that paralyzed them.
Think of it like this: Imagine an army approaching a seemingly impregnable fortress. But as they get closer, they don't just see walls; they see signs of God's overwhelming power – perhaps a sudden, unnatural storm, or an inexplicable confusion among their own ranks. The text suggests it was this divine radiance, this 'splendor of his glory' (Calvin), that caused them to panic.