When creating a long document with many different sections, it’s often necessary to create a table of contents to make navigation easy. Fortunately, Google Docs can generate a table for you almost entirely automatically.
To do this, you must first create section headers using the list under Format > Paragraph Styles. Simply highlight a section title and apply an appropriate heading style for it. Each style grows progressively smaller from 1 to 6. Major sections, such as chapters, should use the largest headings while smaller subsections should use progressively smaller headings.
Once you have created all of your headings, select where you want the table of contents to be in your document and choose Insert > Table of Contents. The table will automatically fill with links to each heading and arrange itself according to the heading styles chosen. Smaller headings will be indented beneath larger headings in the table, indicating that they are subsections.