If you do not have the existing header or footer in your word document, please check how to insert "Page X of Y" with no existing header or footer. However, if you already have a nice header and footer, you may need to manually insert the page number with the format of "Page X of Y". Please follow the steps below for details:
Step 1: Double-click the header area or the footer area to move your cursor to the footer or header;
Step 2: Move the cursor to the place where you will add the page number;
Step 3: Type the word of "Page" following with a space;
Step 4: Click "Quick Parts" from the "Insert" tab in the ribbon, then click "Field";
Step 5: In the Field names list, click "Page", and then click "OK";
Step 6: You need to type " of " (space "of" space);
Step 7: From the "Insert" tab, click "Quick Parts", and then click "Field" from the drop-down list;
Step 8: In the Field names list, click "NumPages", then click "OK";
Step 9: Please check here to add page numbers with a fancy background.