
Search engine is like a librarian. so as the librarian doesn’t search in every book at the library every time you ask for a book also the search engine doesn’t search in all data in real time, he only search in indexed data
Also search engine is already have all data about what you could be looking for in advance, so he is just guessing your questions
And to do this (the guessing thing) search engine needs to understand you better, and for this, there are a bunch of tools starting from NLP all the way to AI and Machine Learning