Q. Many people are very secretive about publicizing when they are expecting the birth of a child. Is there a inyan to do so for any point of the pregnancy? Also, many people don’t do any preparations until the baby is born, and then rush to get them afterwards (buying baby clothes, crib etc…)Is there a makor for such a practice?

A. The Talmud (Baba Bassra 118a) teaches that a person should avoid having people wondering and commenting on his success and good luck, so he won’t suffer the effects of Ayn Hora’a or evil eye.
In Baba Metzia (107b), Rav maintains that 99 percent perish from Ayin hora’a, while only one percent die from natural causes.
Ayin hora’a is part and parcel of Halacha too. As in not calling father and son or two brothers contiguously to the reading of the Torah or giving the same name to siblings (Pischei Teshuva Y.D. 116: 6). Igrois Moishe (E. H. 3: 26) writes that although one has to avoid being ostentatious and grandiose, there are other superstitious activities on which we say; If one does not care, it won’t affect him.
Traditions differ from one community to another. In Aram Zova they would print Bris Mila invitations with the name to be given to the baby. (Mesura Leyosef p. 305).
Chazon Ish (C.M. Likutim B.B. 21) explains that ayin hora’a affects because of the great powers that Hashem granted to the thoughts and cognition that people possess.
Some maintain, that ayin hora’a works in a way similar to tefila and praying. Just like the appeal of a person in need is listened to in Heaven, so are his protests on the success of others that enjoy what he is lacking. His words and thoughts, may create a demand that will instigate in the Heavenly Court an examination of the deeds of others and if they truly merit what they have.
Horav Shlomo Miller’s Shlit”a opinion is that the traditions you mentioned and others similar, are mainly to avoid arousing Ayin Hora’a, and one should follow his family established traditions.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a