This behaviour occurs because Microsoft Word and Google Docs treat header and footer sections as static. During a multi-record merge with a single file, Word processes the header/footer only once using data from the first record and repeats it for all pages. The body content updates per record, but the header/footer content does not.
Workaround:
To ensure header/footer fields refresh correctly for every record, move all merge fields out of the actual header/footer. Instead, place them in a single-row table or text box positioned at the top (for a header) or bottom (for a footer) within the document body. Since body content updates per row, this method ensures each record displays the correct header/footer data.