If you have a login password your Mac, then you don’t really need to assign a password to documents on the Mac. If you need to place a file with sensitive information on a server or send it to another person, you may need to assign a password to the file for security reasons. That is easy to do on the Mac.
If you are using Pages, Numbers, or Keynote to create the file in question, it is easy to do in the macOS. Just go to the File Menu and select “Set Password”.
In the next window you can set and verify the password.
You can also tell the macOS to remember the password in your keychain. Keep in mind, when you set a password like this in macOS it is encrypted which makes it very secure.
In any App on the Mac, you can set a password on a document. All you have to do in the Print window is click on the PDF dropdown and save the document as a PDF. In the next window you will be asked to name that PDF. In that window you need to click on the Security Options button.
In the next screen you can set up the password for the document.
This includes settings for having a password for printing or copying document content.
There are different ways to password documents on the Mac depending on what Apps you are using. Occasionally, it is a good idea to do so depending on the sensitivity of the information.