It kind of starting to make sense now. The prophecy. Why Kaido can only be defeated after 20 years. And why Yamato says that she's just gonna hold Kaido until Luffy returns.
For starters, both Toki and Oden had seen things that are still to happen and Oden put those details in his journal in which Yamato had read.
So here's how things are going in my opinion. Kaido cannot be defeated 20 years ago because the weapon that can does not exist yet or that a desirable continuity can't be achieved if he is defeated back then, so it did not happen. However, after 20 years, he might have been impossible to defeat. So there's a dilemma whether he should be defeated 20 years ago or not. But then, Toki and Oden get a glimpse of the future where a person with a specific DF will be able to defeat Kaido, so they entrust everything to the future, 20 years later.
Yamato read these details from Oden's journal, that's why she'd been expecting Luffy.