I do not need color, so I always buy Laser printers. The first one I got lasted for about 10 years (first at my house, and then at my Mom's). The 2nd laser printer replaced the first after 2 years (because I needed an excuse to get a new printer, and giving the 1st to my Mom was how I did it 😁 ). The 2nd printer lasted about 10 years as well, with the first 8 at my house, and then at my Mom's because the first finally died at Mom's. The 3rd laser printer was a multi-function (printer, scanner, FAX, copier) and that lasted about 12 years until lightning got it. I am on my 4th laser printer, which is also a multi-function printer.
All of them supported PostScript, which means at the worst I could use a generic postscript driver. The last 2 multi-function printers supported "AirPrint" and that made life so much simpler not having to deal with vendor drivers, or the vendor abandoning the printer.
The 1st 3 were HP printers, because I was an HP employee or retiree, and I got an employee discount on the printer and the toner. The 4th is a Brother because HP started to be a pain about ONLY using HP toner. Although this past week, it looks like Brother is going to go down the same lock-in path 😩
So if you are looking for something that gives you long life, get a laser printer that supports AirPrint.