Hi,
To create a table of contents with automatic update of headings and pages go to References section and create an automatic table of contents:

When the table of contents is created, apply the appropriate style for each heading level:

Then click on
Update Table:

It is possible to change the font formatting of each heading style, according to your needs.