There are so many conflicting views on why Hitler invaded Russia and the timing of it, but ultimately, much like the Japanese attacking Pearl Harbour, it was destined to fail.
France was never supposed to lose as quickly as they did, and as the Battle of Britain ensured that Hitler would never be able to invade the UK and could not have them submit and surrender, his attention turned to the east. Much like Napoleon a century prior, he invaded because he thought he could win.
Russia was supposed to be invaded months earlier, but Italy doing Italy things, had to be saved from themselves in both in Egypt / North Africa and Greece.
Germans were forced to intervened in both North Africa and later Greece prior to the invasion, Greece especially was one that was totally unnecessary and gave Britain a reason to fortify and build bases in Greece.
Those critical months lost were arguably more damaging than the flanking strategy imposed by Hitler later that summer that is so often used as reason for not capturing Moscow as well as winter beating the German army. In reality, the flanking led to the largest encirclement in military history (Battle of Kyiv) and Moscow falling would not have caused the Soviet Union to surrender. Japan could have entered the war, however had zero initiative to do so especially with the goals to secure resources in the pacific, and they had just lost a decisive battle earlier at the Battle of Khalkhin Gol
I would recommend watching some of the Extra history videos on the war for a fun way of learning historical events.
Mussolini's failed Greek campaign infuriated Hitler so much so that Hitler even blamed Mussolini and Italy for the eventual failures of the Russian campaign in 1945 (of course that was folly, as Hitler's many serious mistakes and the campaign itself was unlikely to ever achieve its goal)
https://www.history.com/this-day-in-...acle-in-greece
With friends like Mussolini, who needs enemies? Who's invading who?