A family of Microsoft word processing software products for creating web, email, and print documents.
The answers to a couple of questions should help to troubleshoot the situation.
First, did you insert the table of contents by clicking References > Table of Contents and choosing one of the "Automatic" entries in the menu? If not, what steps did you use?
Second, are the headings in the chapter sections formatted with built-in Heading styles, particularly Heading 1, Heading 2, and Heading 3? If not, what styles are applied to those headings?
Background: The Automatic TOC entries insert a TOC field with a basic set of "switches", and if you press the keyboard shortcut Alt+F9 (or Alt+Fn+F9 on some laptops) you can see the field code:
.
The \o switch builds a table of contents from paragraphs formatted with styles that include outline levels (most commonly, heading styles). For example, { TOC \o "1-3" } lists only paragraphs formatted with styles that include outline levels 1 through 3. If the headings in the chapter sections don't have outline levels set in their styles, they won't be included in the TOC. (The built-in Heading styles have outline levels, which can't be changed or deleted.)
The \u switch builds a table of contents from paragraphs whose formatting includes outline levels applied directly, in paragraph settings instead of in styles.
(For other TOC field switches, see this page.)
If you used the Custom Table of Contents command instead of an Automatic one, there are other options that you may have unknowingly included in the TOC field. In that case, after pressing the keyboard shortcut Alt+F9, take a screenshot of the field code and post it in a reply along with the answers to the first two questions.