All pages of a section share the same headers and footers. It's not possible to add contents to a section that fills more than one page and then add one header for the first page, other for the second page and so on as you say you need to do in the topic: I need to place to each page an unique QR-code. DOCX documents don't allow this.
You need to work with sections to be able to have different headers and footers (https://www.techrepublic.com/blog/microsoft-office/accommodate-different-headers-and-footers-in-a-word-document/). The page numbering is a special content type can be continuous along the sections and it's generated automatically (from the template contents or using addPageNumber).