The words themselves aren't the problem. What makes "I don't know" sound bad is stopping the sentence right there.
New managers especially tend to treat "I don't know" as a confession, something to avoid at nearly any cost, so instead they guess, hedge, or answer a slightly different question than the one they were asked, hoping nobody notices the dodge. People notice. A confident wrong answer is far more damaging to your credibility than an honest "I don't know yet," because eventually the wrong answer surfaces, and now you're not just uninformed, you're someone whose answers can't be trusted.
The fix isn't complicated, but it does require a second half to the sentence. "I don't know" followed by nothing sounds like a dead end. "I don't know" followed by a plan sounds like someone in control of the situation, even though they just admitted a gap.
"Um, I'm not totally sure about that one. I'd have to check."
"I don't know the exact number off the top of my head. I'll pull it from the report and have it to you by end of day."
The second version contains the same underlying admission, you didn't know, but it lands completely differently, because it comes with a timestamp and an owner. The listener isn't left wondering whether the gap will ever get closed. They know exactly when and from whom the answer is coming.
This matters even more in a room full of people above your level, where the temptation to guess is strongest. In that setting, a fast, wrong answer costs you more than a slower, right one ever will, a VP who catches you guessing once will discount every future answer you give them, even the correct ones. Saying "I don't know, but I'll find out" in front of a room is not a moment of weakness. It's usually the moment people quietly start trusting you more, not less, because it shows you'd rather be right than look good.
One more version worth having ready: when you genuinely have no idea who does know the answer either. Even then, "I don't know, and I'm not sure who would, let me find out and loop back" beats silence or a guess. The instinct to always have an answer is exactly what produces the bad answers people remember you for.