Apple used to provide drivers for download for some old models of HP LaserJet (and other) printers. But it has now stopped supporting that, and you can now instead go to HPs website to download the drivers for some of their older models or LaserJet printers that are compatible with macOS operating systems.
You can click this link to get to the HP support page where they've listed the supported printer models and also the driver downloads.
I have an old HP LaserJet 1020. Although it's not listed in the page above, it still works with the 1022 driver, that is listed (I'm guessing because they're the same series).
I'm listing the steps on how to install the LaserJet 1020 printer on macOS Catalina (10.15.6).
- Go to this page and download the driver based on the macOS version you have.
- After the download has finished, open the image file. Then double click on the content of the image file to install the drivers.
- Once the driver installation has finished, connect your printer to your macbook and then turn it on.
- Open "System Preferences", go to "Printers & Scanners", and then click the add (+) button below the list of printers on the left side.
- Your printers should shop up in the Add window. Click it.
- Now select the "Use" dropdown field and click "Select Printer Software" option. Search for your printer version (for 1020, search for 1022 and select that).
- Press Add. And that's it.
Your printer should now be all setup and ready to print! You can print a test page to confirm (I'll suggest though directly printing what you want to print as a test, to avoid printing a fake page and wasting a sheet of paper).