I think the in the book he was referring to B2C products when he said search will be replaced by AI. Their main B2C product is not ads. I don't think anyone I know has bought an ad from google.
It would be more accurate to say their main revenue stream is ads, which are sold through their main products (search, YouTube, etc.)