Coming back to this, it seems Vuescan supports your scanner. It costs about $30
Want to keep using your HP LaserJet Pro M227 on macOS Sonoma, Windows 10, and more? VueScan has a built in HP Scanner Driver - so it works even without a driver.
www.hamrick.com
Years of experience leads me to advise you should always try to use native drivers rather than downloading them.
They usually work better, are more up to date and you don't get loads of bloatware with them.
This goes for Windows as well as Mac.
I haven't had an HP device for a while but the HP software used to be really terrible.
If you have a partitioned drive with a small OS partition and a larger data drive- which may well be the case if you have a hybrid drive with a small SSD - it always insisted on installing on the mountable drive and in more than one case was so huge it was too big to install and then refused to install altogether.
Cameras too. I never install all the rubbish you get with cameras and I've been doing that for over 20 years.
Good luck. It can be really frustrating.
I should also add, I rarely use a scanner any more though. The camera on the phone works well for nearly everything and you can scan directly from 'Notes'. It picks it up, crops it and straightens it directly.