Google Docs allows you to create a table of contents based on headings with the Table of Contents item in the Insert menu. However, if you want a table of contents that has links to text in a document that are not headings, you need to use bookmarks.
This video demonstrates how to use bookmarks to create a table of contents.
To learn more about Google Drive and its applications, such as Docs:
http://os-college.com
To use Drive:
https://drive.google.com/drive/my-drive