It’s more complicated. Apple has the branding to have a higher probability of extracting a higher profit margins at higher volumes compared to other brands, so a different buyer is probably not able to guarantee the level of payments Apple can to TSMC.
I don’t think it’s useful to think of it in terms of Apple needs TSMC more or the other way around. They’re both benefiting quite nicely from the cooperation.