Indexing is a process to make a webpage searchable on search engine whereas the process of caching refers to providing a reprinting content snapshot.
For example, if we uploaded a new website, then first of all search engine crawler will read the site and after that, it will store all its contents in its Index Data Base in a different format (by giving priority to the h1, h2, or bold, title, meta tags etc.), it will not place content as it was published. As a result, the site will appear in search results for optimized keywords.
Google also takes a snapshot of each page on a website and stores it in a different data base which is known as cache data base. If you click on the “Cached” link, you will see the web page as it looked when we indexed it. while, Google creates the index and the database of documents that it accesses when processing a query.