Your model of HP printer is not officially supported in any Mac OS later than Mac OS X Mavericks
so the fact that it was continuing to print under macOS Sierra was fortunate.
Click on this link, https://support.hp.com/us-en/drivers/selfservice/hp-officejet-4500-all-in-one-printer-series-g510/3919445/model/3986394 click on choose OS, select Mac and then click on the window on the right
to see which Mac OS's it was supported under. The last software update for it was in 2014.
It is definitely not supported in macOS Big Sur which has just been released and does not run 32bit apps
or 32bit printer drivers which your HP printer will surely use.
Upgrading to Big Sur was a mistake.
At the end of October HP asked Apple to revoke their software certificates causing mac owners worldwide
with HP printers to experience problems just like yourself. HP addressed the problem by releasing newer
drivers with updated certificates, please read this article,
https://support.apple.com/en-us/HT211921
Perhaps your HP printer is AirPrint enabled, read this, About AirPrint – Apple Support