Espionage and spying really went to a whole new level during World War II and continued to become an important part of modern warfare during the Cold War. The British Security Service or as known by their cover title the MI5 used an amazing double cross system that caused every single German spy to be caught during World War II.
In fact, most of them started to work for the British. It was also known as the XX System and it was a counter-espionage tactic that worked amazingly well. It allowed the British to broadcast so much misinformation to the Nazis during the war, that many believe this system was integral to the Allies victory. All of the agents from German intelligence services were either apprehended or many simply turned themselves into authorities on reaching British shores.
There were also numerous false agents, people who had tricked the Germans into thinking they would spy for them if they helped them reach Great Britain – but really they just wanted to escape Germany. The real counter espionage started to happen when the agents that were charged with a German spy initial contact on arrival were controlled by the British.
This meant that immediately on arrival a German spy was already known to British authorities, allowing them to apprehend them almost immediately. The Abwehr as the German secret intelligence agency was called at the time would sneak spies into the country by parachute, submarine or sending them traveling via neutral countries. The last options were the preferred one as they could easily enter Great Britain by impersonating refugees.
Once the war was over, looking through the records it was discovered that every single German agent sent to England had either given themselves up or been captured, with one exception, an agent who committed suicide. The reason so many were spotted and captured was that they were mostly of Eastern European descent and usually were very poorly trained and had zero motivation as it was not really their war.
It became even easier for the British once the German Enigma machine encryption was broken, which pretty much assured they would know of any espionage plans before they happened.