Hi,
Unless you already have backup copies of documents, photos, et cetera, it may be a good idea to try to copy important files to USB flash drives (or other appropriate storage solutions) as soon as possible.
Also, did you download the Samsung driver from a trustworthy site? There are several dubious third-party "support" sites on the Internet, so be careful.
Samsung printers are now part of HP, so drivers can be found there (https://support.hp.com/us-en/drivers/selfservice/samsung-xpress-sl-m2835-laser-printer-series/16462889/model/16462891). The latest available macOS 13 universal driver appears to be the Feb 27, 2023 version V93.3.08 (https://ftp.hp.com/pub/softlib/software13/printers/SS/Print_Common_SW/Samsung_Mac_Driver_V3.93.08.dmg).
Also, a Samsung Xpress M2835DW is listed in About AirPrint - Apple Support as a model supporting Apple's AirPrint technology. This means that the M22835DW should work without having to install drivers, provided that the printer and the Mac are connected to the same network (Wi-Fi router). AirPrint works with wireless (Wi-Fi) or wired (Ethernet) network connections, so you could connect the printer wirelessly or use an Ethernet cable to one of the LAN ports of the router.
Reset the printing system on your Mac to solve a problem – Apple Support (UK)
Add a printer to your printer list so you can use it on Mac – Apple Support (UK)