First, you are underestimating what knowledge and skills you will have in a decade.
Second, you aren't expected to know everything. Not by your peers, at least, but students sometimes have unreasonable expectations. You can't know everything, of course.
Third, it is fine to say "I don't know, but will try to find an answer". Then do that.
If you are asked a question that would be better answered by someone else, send the student to them. Sending a student to a colleague with a different specialty is fine.
You can also suggest where the answer might be found. This is often the best answer if it gets the student doing a bit of research. They learn about sources and methods that will serve them in other situations.
And, most of the questions you are most likely to get arise in situations in which you are probably the person with the most skill and experience to answer. As you have seen, most professors answer most of the questions fielded to them and do something "useful" about the others.
Let me emphasize again, though, that answering all questions may not be the best solution. Better to "guide the student to the answer" than to just "give the answer". That can even result in serious research at some levels.
In any case, don't fake it. If you have to speculate, say that you are speculating.
See this answer to a different question for a story about answering questions in class.