At any ime of my document process, how do I do legal line numbering, and how do I get the page numbering in the top right hand corner?

At any time of my document process, how do I do legal line numbering, and how do I get the page numbering in the top right hand corner?

Also to ask this question this page required me to fill in a ‘tag’. I dont understand the words offered since they dont relate to my question, so let me know why they require it when they dont tell you what it means. The tag I chose was common, it was the first one. To me a tag would be a word related to the question, but it would not accept the word ‘numbering’, which obviously IS related to my question.

To insert page numbering: Menu/Insert/Fields - Page number.

About line numbering:

https://help.libreoffice.org/Writer/Adding_Line_Numbers