It is interesting that Yamato specifically sought out Luffy. He could have decided to look for Kinemon, Law, Kid or even Momosuke, but instead he decided to look and help out Luffy. Now some may just say that Luffy happened to be in his vicinity while he was avoiding Kaido, but he also specifically says has been WAITING for Luffy.
A smaller and less important note is that he referred to Luffy as “Straw Hat Luffy’. This means Yamato learned about Luffy prior to his arrival, maybe by someone close.
I think this person might be Ace, but there’s more to this. Ace arrived in Wano 5 years ago. So far, the only knowledge we have about Ace’s journey in Wano was him making a strawhat (for Oars) and him helping out Tama. Nothing else, which seems a bit inconsequential for something that could have been a major plot line. However, we do know that Ace stayed in Wano for sometime.
Yamato and Ace have many similarities. Roger told Rayleigh that he wanted his son to be the next pirate king and his successor.
Kaido seems to have groomed Yamato, to be his successor, judging from Yamato’s fighting style and Kaido’s upcoming speech concerning his son. Kaido also seems to have high expectations for people’s sons, as seen when talking to Momosuke, he expected him to be a warrior like Oden. Perhaps he wanted Yamato to be like him and take his place as captain one day.
Ace also disliked his father, and he felt like he had to live in Roger’s shadow and even ended up idolizing Roger’s enemy Whitebeard. Yamato seems to dislike his father judging from the fact that he attacked two of his subordinates and disobeyed him, and also seems to idolize Oden, his father’s enemy.
My theory is this. 20 years ago, Yamato witnessed Oden’s death and idolized his heroic acts. Since then he waited 20 years for the arrival of the 9 Red Scabbards. However 5 years ago, Ace arrived in Wano. The two became friends due to the similarities they share, and Ace invited Yamato to join his crew. Yamato was torn from this decision. While on one hand he wanted to be free of his father’s influence, didn’t want to be his successor and wanted to travel, on the other hand he not only feared Kaido chasing after them, but also wanted to wait for the 9 Red Scabbards of Toki’s prophecy.
Ace, understanding this, probably told him to wait for Luffy. This way, Yamato gets to join the Kozuki rebellion, have a chance in defeating his father and could potentially join a pirate crew so he could escape his duties as Kaido’s heir.
This could explain why he sought out Luffy specifically instead of the many other major characters in Onigashima.