I am going to show you How to Create a Table of Contents in Google Docs
For this to happen you need to setup some heading on your document.
I have the document and lets setup some heading.
Select a title and format it as Heading 1
Select another titles and format it as heading 2 and 3
After we have the titles already setup go with the cursor where you wish to add the Table of contents.
Click on insert and select the Content table type.. with pages or without. I will select with pages number. When you click it… will automatically be added on the page.