Google Sheets doesn’t have a built-in function to generate a table of contents like Google Docs.

However, you can achieve a similar functionality using two methods in Google Sheets.
Contents
Manual Hyperlinks:
The first method involves manually creating a table of contens.
Add a Blank Sheet
First, create a new space separate from the rest of the spreadsheet for your table of contents. Click the black + symbol to the left of your existing sheets to create a new sheet.

Change the sheet’s name to indicate it is a table of contents. We’ve named it “TOC” in the image below.

Enter the Links to Each Sheet
In your TOC sheet, manually enter the titles you want to link to.

For each title, insert a hyperlink that jumps to the corresponding sheet and cell location. Right-click the cell and select “Insert link” (or press Ctrl+K).

Choose the target sheet and press enter. Repeat this process for all sheets. Your Google Sheet now has a fully functioning table of contents.
Sheet Indexer Add-on:
While not natively in Google Sheets, an add-on called Sheet Indexer helps you create a table of contents. You can install this add-on in Google Sheets by going to Extensions -> Add-ons -> Get add-ons. This menu option will take you to the Google Workspace Marketplace. Once in the Marketplace, search for Sheet Indexer and follow the prompts to install it.
After starting Sheet Indexer, you get a sidebar that helps you create your index.

Build Your Index
Click BUILD INDEX, then ADD AI SUMMARIES. Clicking these two buttons will give you a full table of contents, including each sheet’s name, description, and size.

Compared to the manual method, especially when dealing with larger spreadsheets with a large amount of sheets, Sheet Indexer is significantly faster and more accurate than creating your table of contents manually.
Summary
Remember, the hyperlink method is more straightforward but requires a manual entry for each link. The Sheet Indexer automates the process but involves a third-party add-on. Choose the approach that best suits your needs.