Question: How much time lapsed between the story of the spies and that of Korach?
Answer: Hi! Very good question. Though there are commentaries (such the Ibn Ezra) who place the story of Korach much earlier chronologically, the Ramban (Nachmanides) says that it’s very important to place the story immediately after the story of the spies. Korach, Dasan and Aviram might have thought of this rebellion much earlier, but they would never have dared to try it. Israel, glorious and standing at Mt. Sinai, grateful to Moshe (Moses) for all that he had done for them, wouldn’t have put up with it for a second. But after that generation was condemned to die in the wilderness, and not to come into Eretz Yisroel at all: then they were depressed, and bitter at heart, and receptive to Korach’s message.