I have experienced both, times when talking about an idea fully took away the will to actually do it. It then felt like it was already kind of existing in someone else's mind and now "I had to" so it kind of took the wish for me to develop. So, for certain kind of ideas it has worked better for me not to talk about it. I noticed it is usually ideas that are too big or would be too defining in my life, because then it would be kind of a "failure" when I don't succeed in it. So, those I sometimes think about and test them on my own, learn about and research first to evaluate whether I should put more energy on it or not. And if the drives looses naturally, it might mean that it was a quick dopamine release having the idea but it isn't actually a full passion that aligns with my skills and values. I have heard of other people though, who say that when they have that responsibility of actually doing it because they have put it out in the world, actually gives them a drive to do it, unlike me. So it might differ per person, I am sharing my perspective and that is that there are different kinds of ideas, some that are great as life project (worth testing before promoting) and other kind of ideas where the focus is experimentation. The ones where there is no much weight, can be realised without much stress and therefore next to a job or other activities and it isn't a big deal if the thing doesn't succeed. Sharing those ideas has brought me a lot of unexpected adding to the idea, mostly a lot of support of people. Either they know a tool that could help me, or know someone that might help me or they want to volunteer or be part of in a way, or know a story of someone related to it. It puts the idea in a flow.
So, so far my conclusion is that it isn't a rule whether you should talk about it before or not but there might be different kinds of ideas that need different treatment. Experimentation stills seems to me, the best approach to ideas. Testing. Out of a 100, 5 survive, but then at least, I still have those five which is more than zero. Low possibilities of something are still possibilities.