She didn't know that yet. Luffy made her realize that to be Kozuki Oden she must be loved by the people of wano.
His execution was for her conviction to become Kozuki Oden. The quote makes it clear that she wants to join Luffy's crew as Kozuki Oden. She only said it because she already thought she was Kozuki Oden. But what Yamato says to Luffy makes no sense. She already thought she was Kozuki Oden even though she is neither free nor loved by people in wano. Luffy makes it clear to her that she can't be Kozuki Oden because he is loved by people in wano. So in order to become Kozuki Oden she not only has to be free but also loved by the people of wano.
Understandable that she already wanted to go out to sea and join a crew because Yamato already thought that she was Kozuki Oden.
If only the reason was right. Ace is the reason why she wants to be on Luffy's ship since he is ace's brother, not Luffy is the reason. If Luffy were not the brother of Ace, she would have no reason to join him. The reason should be Luffy, not Ace. Therefore, she only wants to be on Luffy's ship for a wrong reason. Also, she only said that she has been locked up in Onigashima since she was 8 years old, but not that she has wanted to explore the world for 20 years. She just told him that she couldn't travel with Ace because she's been trapped in Onigashima since she was 8 years old.
When she wanted to leave Wano to go out to sea was never said. Maybe she just wanted to leave Onigashima first because of her father, not to explore the world until she met Ace and to imitate Oden.
But she had only said that because at that point she still thought that she was Kozuki Oden until luffy made it clear to her that it is not so easy to be oden. She must be loved by the people to become Kozuki Oden. I had agreed that Yamato as the shogun didn't really make sense.
Ok, here's what the chapters says.
Chapter 983, I’m Yamato, im kaido’s son
Chapter 984, chashes with luffy, remembers ace
Chapter 984, I want to be oden kozuki, carry on Oden’s will, Open Wano to the world, I want to fight on your side, you remind me of ace
Chapter 985, so speaking as kozuki Oden, i've followed the proper logic that says, as ace’s brother, you should be giving me a ride on your ship, wants to be like oden: to go out to ace and his friends and be free, these handcuffs have kept me trapped here for 20 years, Kaido: the shogun will be my son Yamato-Yamato: Not even for a second stupid dad.
Yamato: I wanted to got out to sea with ace and his friends so badly, but I have been imprisoned on this island since the age of eight.
Luffy: Hang on, you can't be Oden, because oden is a guy everybody loves. yamato: okay fine, maybe your more oden than me, how can I be Oden and not be free.
Conclusions:
1. Yamato wants be like Oden because she wants to carry on his will/dream of opening Wano's borders, nowhere does it ever say she wants to be shogun
2. Yamato wanted to leave Wano and go out to sea with Ace, but couldn't at the time but she was imprisoned so she couldn't and missed her chance, she never said that she would only leave with Ace and no one else. Otherwise, she wouldn't bother be cahsing luffy in the first place
3. Yamato's own personal requirement that she has set herself to be like Oden: is the condition that she is free, has nothing to do with being shogun.
4. "yamato: okay fine, maybe your more oden than me?" Yamato never said she was trying to imitate Oden/ follow his path/ or copy him to a tee. She's saying that in order to proper follow her role model oden, one of the requirements must be that she is free, like how oden was free to leave wano. Yamato tried this with ace, but it didn't work. That's why she's trying it now again with Luffy.
This is Because:
1: She knows that Luffy is trying to take down kaido and liberate wano- this will open wano's borders after this is over, because kinemon and the others have already agreed and settled on this, which is also what oden originally wanted
2: Luffy's conversation mean pretty much nothing in this, since he was just confused of why someone who is clearly not oden, is saying that she is oden. Luffy NEVER said that Yamato has to be or not be Oden for her to join her crew (he probably doesn't care anyway).
3: She knows that Luffy is from outside wano, and when its all said and done, luffy will leave afterwards since he has a ship, just like Ace. That's why yamato asks to be aboard luffy's ship.
To sum it all up:
Yamato saw oden leave wano, saw the incredible man he was, saw how he died. Yamato was inspired and wants to do the same/walk the same path. Somewhere down the line she met Ace, saw he came from the outside of wano and has a ship, sees her first step in walking in oden's footsteps, asks ace to bring her along, was rejected. Luffy arrives in wano to take down kaido. Yamato saw the news, breaks out of prison to find luffy, asks: to join his ship, to allow her to them in the fight on their side, tells luffy about how passionate she was about oden's actions.
Where is this whole stay in wano, be the next oden, become shogun, solo sailing business ???
Yamato wants to be like oden, because oden was the only wano citizen who was able to leave wano. (not counting Izo,tori or momo because Yamato most likely doesn't know about that). Oden is Yamato's role model. Yamato didn't want to be like oden so she can stay in wano, also nowhere does she ever say she wants to be loved by all the citizens of wano. It was the same thing with oden too, wants to leave wano, didn't and never cared about how the wano citizens liked him or not, UNTIL oden saw what kaido and orochi were doing, giving his all to save wano from falling to orochi and kaido, but the wano citizens didn't believe him at first becasue of his antics due to being black mailed by orochi. Oden was also the only person from wano who showed the greatest defiance against kaido, being able to leave a lasting scar on him, no one else had hurt and defied his father like oden, and Yamato wishes that someday she would be strong enough and given the chance to do the same.
Yamato worships oden, because oden is the proof that she can escape from her father's fate and hands, she doesn't worship oden because she wants to become Oden 2.0, staying in wano and/or becoming shogun.
Luffy is the dumbass who doesn't understand Yamato's words, and was mistaken that someone is impersonating Oden when he already knows oden is clearly long dead. Luffy's words here don't really mean anything. Yamato wasn't trying to trick luffy into believing she was Oden either, oden is just her role model, and she was betting on oden's mannerisms and way of speech to convince luffy to help fulfil her wishes: liberating Wano and leaving the country on Luffy's ship. The same wishes that she betted on Ace, now she's trying her luck again with luffy, hoping that the second time is the charm, because luffy is Ace's brother.