Automatic table of contents in an agreement

How do I insert insert table of contents in a word document/agreement that populates/updates automatically?

This involves two steps:

(a) Firstly, for whichever words/headings you want to appear in your table of contents, you should change the ‘style’ of such words from ‘Normal’ to ‘Heading 1’ from the ‘Styles’ tab.

(b) Once the above is complete, you can go to the ‘Reference’ tab and click on ‘Table of Contents’ option and choose a desired style.

The Microsoft documentation for this is quite helpful. Here is the link