''When I enter the first page number in the header of the first page"
If you entered the actual number,, that is your error.
Click in the Header or Footer box in which you want the page number to appear.
Pages will give you the option to "Insert Page Number"
Click that instruction, then choose the form of page numbers to use from the resulting menu.
The menu shows a choice of Page 1 of 1, but I changed my mind and clicked the first menu item — just the page number.
And that is what is displayed. Above is the page number as it appears on Page 1. Below is the page number on the next page, inserted automatically by Pages, with no further user action.
The light lines outlining the three header boxes appear when you are editing the content of these Header boxes, and disappear in the finished document.
Regards,
barry