A family of Microsoft word processing software products for creating web, email, and print documents.
There is a \s switch that can be included in the TOC field code (see https://support.microsoft.com/en-us/office/field-codes-toc-table-of-contents-field-1f538bc4-60e6-4854-9f64-67754d78d05c ) to include a number created by a SEQ field in the text. The same identifier, such as "chapter", must be in both the SEQ field code and the TOC field code.
That switch is intended to be used with multiple copies of the SEQ field, each of which generates a different number, to indicate multiple chapters in one document. However, there's nothing to prevent placing only one SEQ field in each document, and there's no requirement to put that SEQ field in a header. Just stick it at the beginning of the document, just before or just after the TOC.
Even better, the SEQ field's result doesn't have to be visible. I've tested marking the SEQ field as Hidden, and the TOC still generates the desired number.
With Hidden characters displayed:
With Hidden characters invisible: