Yoda warned Luke Skywalker the dark side would dominate his destiny if he let it, and the later Star Wars movies proved he was right to give this warning. Luke was constantly tempted to give in to anger, fear, or aggression, and while he managed to overcome this temptation in Return of the Jedi, the lure of the dark side never entirely goes away. Yoda made clear that even a single step down the dark path could shape the future, and this ended up being the case for Luke. Whatever faults Yoda may have had, his warnings about Luke's dark destiny were definitely on point.
This warning makes even more sense given Yoda's own history with Anakin Skywalker, who followed an even darker path in the Star Wars prequel trilogy. Master Yoda failed Anakin in Star Wars: Episode II – Attack of the Clones by failing to confront him over the pain he sensed after the Tusken massacre, then failed Anakin again when he had visions of Padmé dying. This fear ultimately lead to the destruction of the Jedi Order. It's perfectly reasonable Yoda would want to keep Luke from making the same mistakes as Anakin, warning him about what could happen if he gave in to fear of the unknown. Sadly, Luke wasn't able to escape Yoda's warning forever.