Visit http://www.hp.com/support and look for your printer/scanner drivers for Big Sur. If they don't exist, then you need to either see if the open source drivers support the printer, or get a comparable printer that does.
Open source drivers are loaded by connecting the printer via USB to the computer, and using Apple menu -> System Preferences -> Printers and Scanners, to add the printer, but instead of just hitting the plus sign where it is added, hold the Option key down as you hit the plus sign on the screen with the mouse. This forces the open source drivers to match with the printer.
Scanning is typically possible without official drivers either using the Application called Image Capture, or with Hamrick Vuescan, SANE drivers, or TWAIN capture in applications that support TWAIN and scanners that support TWAIN.