The most common way to change the number of levels shown in your table of contents is to just replace the existing table with one that contains the levels you want. A shorter, but more technical way to do it is to edit the field code information.
If you want to change the level of an individual table of contents entry, change the heading level of that text in the body of your document. To read more about that, see Change the level of a table of contents entry.
Replace the table of contents
Click References > Table of Contents > Custom Table of Contents.
In the Table of Contents dialog box, in the Show levels list, choose the number of levels that you want, and then click OK.
For example, if you click 2, then all text with the Heading 1 style or the Heading 2 style applied is displayed in the table of contents.
When you are asked whether you want to replace the existing table of contents, click Yes.
Edit the field code information
Word inserts fields automatically when you use particular commands. For example, when you Add page numbers, Word inserts the Page field. When you Create a table of contents, Word inserts the TOC field.
You can edit the field code information to quickly change the number of levels shown in your TOC.
Click in your table of contents, and then press Alt+F9. The field code information appears between curly brackets and looks like this:
Change the numbers in the quotation marks. For example, if you want to show only two levels, change "1-3" to "1-2".
Press Alt+F9 to display the table of contents again.
Update the table of contents to see your changes (References > Update Table).
If you’d like to learn more about field codes, read Field codes in Word.