No.
What you heard is that they couldn't tell yet whether or not they would prevent infection, because they did not have the data to answer that question.
How I understood it is that (until recently) there was no proof that the vaccines prevent infection, because the tests done so far weren't designed to check this, therefore they weren't sure they would; but considering experience with previous vaccines and medical expertise, they were pretty sure that there would probably be at least a decrease in spreading if only because you wouldn't be coughing around; and most likely a significant decrease.
Recent data shows that vaccines will in fact decrease infection considerably.
I don't understand how this misinformation is so commonly accepted as fact. It seems that everyone who hears this can't wait to spread it as a means to look smart and better informed than other people, because it's like a "hot take".
It's important that this misinformation gets rooted out as soon as possible because it's a common argument that people use to justify not taking a vaccine - e.g. "I won't take the vaccine because I'm young and I can take the disease, and it won't stop me infecting other people anyway". Spreading this misinformation is therefore quite literally dangerous and causing damage and costing lives, and like I mentioned even pro-vaccine people like to take it as fact and spread it around. It seems like a very viral fake fact.