Thank you for the additional information.
The SCX-3401 model does not appear to be listed in the About AirPrint article.
Instead, you could perhaps carry out an experiment with a driver for another printer model. This may or may not work with your printer. It may be a good idea to begin by resetting the printing system (see link above).
Initially based upon old (macOS Catalina) SCX-3401 compatibility information in the article https://support.hp.com/us-en/document/c06520117, it may be worth testing whether the latest (May 9, 2022) V3.93.03 Samsung universal print driver for macOS 12 and the Xpress SL-M2070 (https://support.hp.com/us-en/drivers/selfservice/samsung-xpress-sl-m2070-laser-multifunction-printer-series/16450377) possibly could be used in this case. The idea would be to re-add your printer while choosing to use SL-M2070 printer software.
https://ftp.hp.com/pub/softlib/software13/printers/SS/Print_Common_SW/Samsung_Mac_Driver_V3.93.03.dmg
Before testing any printer drivers, make sure that you have multiple backup copies of all important files (documents, photos, et cetera). Software conflicts can never be ruled out.