Star Wars revealed that Yoda received a warning about Order 66 at the start of the Clone Wars, making it unclear why the Jedi Master chose to ignore it. Order 66 wiped out most of the Jedi Order, so if Yoda knew about it in advance, then he could have taken steps to make sure it didn't happen. The entire Star Wars saga would drastically change with this outcome, having the Jedi Order survive and the Sith defeated earlier in the timeline. From this point of view, it seems clear that Yoda should have listened to this warning, however, the situation was "much more complicated," as Qui-Gon Jinn would say.
Each era of Star Wars features a Jedi character burdened with knowledge of the future, and each situation always leads to a different outcome. Anakin Skywalker had visions of his loved ones dying, Luke Skywalker saw his friends in pain, and Rey believed Ben Solo would turn back to the light. Star Wars: The Clone Wars also had several characters in this situation, including Ahsoka Tano, Anakin, and on more than one occasion, Yoda. With so many warnings of the future and a number of different outcomes, it's worth considering whether Yoda was ultimately right to ignore his own warning about Order 66.
Yoda Had A Vision Of Jek's Role In Order 66 Yoda's warning came as a vision of Jek, one of the two clones who eventually tried to kill him on Kashyyyk during Order 66. This was seen in "Sharing the Same Face," an adaptation of The Clone Wars season 1, episode 1 "Ambush" which was featured in the anthology The Clone Wars: Stories of Light and Dark. During his meditation, Yoda had a vision and "sensed Jek's feelings of disbelief and regret – but a moment later those feelings were gone, replaced by the need to obey." Although the vision is vague, it still shows a clone soldier following orders too quickly, something Yoda had just been concerned about earlier in the story.
Even if there were multiple ways to interpret the vision, its meaning should have become clear to Yoda later in the war. The Jedi eventually discovered that all clone soldiers have inhibitor chips to make them more compliant, and a Jedi Master was killed when one of the chips malfunctioned. Dooku's role in creating the clone army was also revealed, and Yoda experienced a more detailed vision of Order 66 on Dagobah. The fact that Yoda was warned and given plenty of context throughout the Clone Wars makes it clear that the Jedi should have discovered Order 66.
Why Yoda Ignored The Force's Warning However, Yoda ignoring the Force's warning made sense from his point of view. Yoda reminded himself in "Sharing the Same Face" that "visions of the future were a dangerous lure," and that many Jedi had been led astray while trying to prevent them. Anakin's fall was the perfect example of this, letting his fear of Padmé dying drive him to the dark side. As for the evidence that came later, Yoda believed that the Jedi had already lost by participating in the Clone Wars. He wanted to prevent Order 66, but he also feared what would happen if the Jedi gave into fear over visions of the future.