Many people worry that not knowing something is a sign of weakness, and that if a leader seems not to have all the answers they will lose the confidence of their team. Such people try to pretend they have the answer in every situation, making things up if necessary and never admitting mistakes.
However, this approach ultimately backfires. Sooner or later people learn the truth and figure out that the person never admits when they don’t know. When this happens the person loses all credibility: no-one can tell whether the person is speaking from authority or making something up, so it isn’t safe to trust anything they say.
On the other hand, if you admit that you don’t know the answer, or that you made a mistake, you build credibility. People are more likely to trust you when you say that you do have the answer, because they have seen that you don’t make things up.