Redacting PDFs - software and techniques
On macOS 11+ (Big Sur onwards) you can use the Preview tool for simple redaction. It is not always able to fully redact a document, for example if text extends over the right/left edge of a page then this may remain after saving - Preview can only remove what you can see on screen. If the resulting redacted document is to be shared externally, then this may not be adequately secure and you should consider converting the resulting document to a PNG file - this may not be acceptable on accessibility grounds as the text will no longer be easily machine read.
To use Preview's tool, open the PDF and use Tools > Redact. When you select this you will get a warning that the content you redact will be permanently removed - if you need to retain an unredacted copy then please ensure you are editing a copy of the original file. Click OK. Now select the text to redact by dragging over it, the text will be covered by a black rectangle with crosses. You can undo and edit this until you save the document.
For ultimate confidence that the text is gone you can use File > Export... to save to a PNG.
Windows/macOS Adobe Acrobat DC
The subscription-ware Adobe Acrobat tool can be used to redact content - see https://www.adobe.com/acrobat/hub/how-to/how-to-black-out-text-in-a-pdf-file.
Subscriptions to Adobe Acrobat can be purchased via WIN IT help.
The LibreOffice Draw program can be used to redact PDFs. The output from this process may not be identical to the original document, in particular text layout may not be as good as the original, as the redacted document will be an image, not text.
To redact content, open the PDF in Draw and then use Tools > Redact > Rectangle (or Freeform) to blank out the area of the document to be redacted and then the redacted form can be generated using Tools > Redact > Export Redacted PDF (black) (or white).