Only three options really.
1) Yamato doesn’t join so as to not disrupt the M3 dynamic: Can’t begin to explain how unlikely this is lmao. She’s absurdly popular for how long she’s been in the story, just about all the merch and marketing for Wano for the last year or so have been pushing Yamato HEAVILY, and the last time a character was as popular as she is, Oda gave said character more relevance in the first half of post timeskip than any Straw Hat besides Luffy (Law). It’s obvious she’s meant to be an Oden allegory and normally when it’s been decided that a newly introduced character wants to join the Straw Hats, they join lol. And unlike Vivi, Yamato has no real reason to stay on Wano to begin with when all she’s wanted to do for the last 20 years is escape the bloody place.
2) Yamato joins and she’ll remain stronger than Sanji: If this arc has made anything clear, it’s that Oda will go out of his way to cement Zoro and Sanji as Luffy’s right and left hand men. It’s an officially established dynamic now, there’s no getting rid of it. If Sanji’s lagging behind then Oda will simply boost him one way or another until he’s caught up. Which means…
3) Yamato joins and Sanji grows stronger than her: …if and when Yamato joins the crew - and I’m still positive she will - Sanji’s gonna have to at least get strong enough to match her in power by the next time the SHs face their next major enemy, if not outright surpass her.
How he’ll do that, idk. AdCoC and broken Devil Fruits are the meta in the top tier, and Yamato happens to have both. Sanji’s Germa enhancements are complete by his own admission which has basically given him Zoan-esque physical stats, but clearly it’ll take more than that to damage Queen so there’s more to come than that. A Lunarian-based fire buff’s very probable, but in that vein we haven’t seen anything particularly impressive from King in that regard so far, outside of blowing up when stabbed and enhanced regenerative ability (which Sanji already has). But maybe he learns to turn up the heat of his fire even further, but again, if he wants to match up to Yamato, whatever power he gets would have be major if it’s not CoC.
So that leaves Haki. If he DOES get a Haki bloom, I feel like it’ll manifest through his flames, which are getting a lot of focus in this fight. I also don’t think the possibility of CoC is as remote as people think it is. Being descended from literal rulers and conquerors isn’t something that can just be dismissed here I’m afraid, especially if storywise it would be a massive middle finger to Judge if Sanji turned out to be born with the kingly qualities Judge said he lacked. Regardless though, there are a lot of possibilities open to Sanji for getting stronger - more so than most tbh.