Americans used to pronounce Z the same as the rest of the world until someone wrote the ABC song and decided it needed to rhyme with V, and then an entire generation grew up saying it wrong and it stuck. At least that is what I’ve heard in Canada.
It’s also why there is a Canadian version of Sesame street where the last verse doesnt rhyme because up until the late 90s our TV censors used to straight up nope things that would cause kids to be confused about how things should be pronounced.
Looks like it was a combo of both, reading about it further. https://www.rd.com/article/americans-british-pronounce-zee/
Regional dialects at first, but then the dictionary declared it the official pronunciation and shortly after the song was produced, which would have spread the use from being regional and encouraged homogenization