Word insert automatically generates serial numbers and directories.
Make sure that the format of the document is correct when generating the directory, that is, the annotation of the diagram should be set to the title format. Right-click the blank space in word to select the outline, and add an option in the upper left corner. Choose the title level as needed. You can click "View-Document Structure Map" to check whether the format is correct. If the table of contents of the document is completely displayed on the left, the table of contents can be generated.