well no one would know your phone number unless you provided it to them in some indirect or direct way. in the case where you provide it to some service and they somehow get hacked, it still states in their EULA that they are only reasonably responsible
theres a difference posting publicly available information that the person intentionally released for all to see, and collecting a bunch of public or semi public information and then releasing it for all to see (and potentially use in negative ways, like harassment)
like i could use social engineering to figure out your name, where you live, your phone number, your place of employment, gf/bf/family/etc given just your email. theres no liability in such a process, and the info is “public” in the sense that anyone else could go through all these hoops to get it/you released it to various parties at various times, but its clearly passing many lines in terms of decency/respect/privacy