Create your header.
You can do this by either editing the header and typing or by inserting the header you want.
Then edit the header. Put the cursor where you want your page number. Insert a page number at the current location. This puts a PAGE field in your header.
The building blocks for headers/footers and page numbers that go in the header/footer area supplant one another when simply inserted.
Once you have a header/footer you like with the page number where you want it, consider selecting it and saving it as your own header building block.
Sections / Headers and Footers in Microsoft Word 2007-2013