There's a few ways.
The simplest is to have Nazi Germany fall before the war starts. Maybe one of the assassination attempts on Hitler gets lucky, maybe Hitler dies from whatever malady. Without Hitler the Germans lose so much and probably don't repeat their winning ways.
Various revisionist Free French intellectuals have advanced the idea of France holding back Germany in 1940. I think this one is pretty unlikely - 1940 wasn't 1914 and France had deep, systematic flaws as well as cultural wounds from WW1. Stranger things have happened in history so I suppose it's possible, but I wouldn't put it forth in any serious history without a lot of other changes before it. If France can somehow check Germany in Belgium, then perhaps enough time can pass for the Germans to be checked or even overthrown. I sincerely doubt the French can take the war to German soil, but if the Soviets decide to take a swing at them, the Germans may well collapse before the weaknesses of both France and the Soviet Union lead to their defeat.
Better British preparation for a land battle in the UK might do it as well. Even with the miraculous victory of Sealion, they still had to take and pacify the British Isles. That's not an easy task, and if the Brits hadn't fumbled and panicked, the Germans may well have been pushed back to the sea. This feels like the biggest and most plausible way for the Germans to be stopped. It doesn't get them out of France and the Soviets are still screwed, but the UK stays free and may one day liberate the continent. Really, British mishaps in the war paved the way to Germany winning. Take those away and it's a whole new war.
The last opportunity is for the Soviets to somehow stop the Germans, but uuuuh how? They collapsed in the greatest military catastrophe of the 20th century. The entire structure was rotted, a simple poke cause the Soviet Union to collapse. The only thing that slowed the German advance in the Soviet Union down was logistics, the Red Army never seriously competed with the Germans. The studies of the Red Army in the aftermath and beyond have been universally negative towards both the Red Army of 1941, the Soviet structure and Stalin himself. It would take massive changes to make the Red Army capable of stopping the Germans. It was so bad that the Japanese were able to claim huge swaths of Siberia simply because the Soviets were so maimed by 1942, the same Japanese with a tiny fraction of the Soviet Union's economy and production.
German victory in the war comes down to the Germans being ready, innovative and hungry, while their enemies were a unique blend of weak, inept and unlucky. It was a perfect storm brewing, but one that's hard to stop without stopping Hitler before the war. It was a tragedy, no two ways about it. Sometimes the bad guys win, something proven by the Nazi victory.