Google searches are in no way free. Businesses pay for them in ad spend. Governments pay for them in lost tax revenue and opportunity costs lost through decisions influenced by Google's lobbying.
These are indirect costs, but they still have an overall economic effect.
You could argue - perhaps with some justification - that the net value generated by Google search is more than the net economic costs. That would be an interesting thing to try to estimate, and so far as I know no one has attempted it.
But that just highlights the underlying problem, which is that most mainstream economic models are completely unfit for purpose.
We're trying to run a 21st century economy using banking systems that haven't changed in principle since the 15th century, and econometrics that have barely evolved since the 19th century.
And all of that happens with a huge political bias that overestimates the value of some activities - including speculation, and other forms of wealth capture - and underestimates the value of authentic wealth generation.
In fact no one knows how well the economy is doing, because we barely have any idea what an economy is - certainly not in 21st century terms, where "the economy" is clearly a global pattern of resource flows, innovation, and future potential, not just an epiphenomenon of national or corporate accounting.
Not calculating GDP correctly is a tiny symptom of that. A full solution is probably going to need a complete reinvention of the entire field.