Hello Win7ul and welcome to Seven Forums.
According to the Lexmark support page, the last driver(s) made for the Z31 were for Windows XP.
Z31 Color Jetprinter
You could try using the XP driver in Compatibility Mode. It may work but with limited functionality. Some features of the printer may not work.
Compatibility Mode
You could google for 3rd party Z31 drivers that may or may not exist. And if they do exist, you run the risk of downloading malware or other problems since the driver wouldn't be coming from Lexmark.
And the third option is to buy a newer printer. I know ... it doesn't make sense to abandon a piece of equipment that still works. But it's working on an operating system that's 11 years old. Just as an example, my local Walmart has a Canon all in one printer, copier, scanner for $29. They have similar prices on HP and Lexmark all in ones as well. Might not be a bad time to upgrade. No disrespect meant.
Canon PIXMA MG2120 Inkjet Photo All-In-One Printer/Copier/Scanner - Walmart.com