Hello,
The current version of Word to HTML doesn't support transforming the TOC. On https://www.phpdocx.com/documentation/introduction/word-to-html-PHP you can read the supported contents and styles and how they are transformed. Instead of TOC we recommend you using links with bookmarks or cross-reference contents.
Using the conversion plugin based on libreoffice or msword (https://www.phpdocx.com/documentation/conversion-plugin) you can generate the TOC contents and then transform the DOCX output to HTML with TransformDocAdvHTML.
Regards.