I think Harris's much wider name recognition would help her beat Warren in such a contest.
Gallup's last poll of Warren's favorability in the 2020 primary campaign (taken in Jan. 2020) showed 89% of respondents having an opinion of her:
https://news.gallup.com/poll/1618/favorability-people-news.aspxThat's the same as the percentage of people having an opinion of Harris in January of this year. They both have near-universal name recognition amongst people who actually vote in primaries. And that would be even more true in 2024 after a hypothetical primary campaign in which they're the only two major candidates running for the nomination.