Worth remembering that Stalin had been warned in a general way of Hitler's intentions toward Russia back in 1939.
And within weeks of Hitler's decisions in 1940, Stalin was again being warned of the coming attack.
Stalin refused to believe all such warnings.
Stalin gambled that the Germans would get bogged down in the West-when France fell so quickly, he realized that he would not be ready for a Nazi attack, so he did anything he could to buy more time. This meant he couldn’t act as if he knew a German attack was imminent, for fear of provoking an attack even earlier.
Stalin didn’t even believe it when the invasion of Russia was happening. He actually withdrew the first few days and didn’t even speak to his aids in a fit of almost fatal depression. It’s amazing how many warning signs he was given that he wrote off as propaganda planted by the British to try and get the Soviets in a war with Germany.