First, prove the printer itself is fine
Before touching the computer, print something from the printer’s own menu. Almost every model will print a network or configuration page from its front panel, usually under Settings, Reports, or Network.
If that page comes out, the printer itself is working, and the problem is the connection between it and the computer. A new printer won’t fix that.
Keep the page. It shows whether the printer thinks it’s connected to your Wi-Fi, and its IP address, which looks something like 192.168.1.87. You’ll need that number later.
The band problem
Your router broadcasts on two frequencies, 2.4GHz and 5GHz. Most home printers, including current models, only understand 2.4GHz. Phones and laptops prefer 5GHz because it is faster.
On its own that is fine, because devices on the two bands can still talk to each other. The trouble starts with the way modern routers present both bands under a single network name and move devices between them automatically. It is convenient and it usually works, but printer discovery is one of the things it breaks: the setup process on your laptop sits on 5GHz looking for a printer that only exists on 2.4GHz, and reports that there is no printer.
The workaround is to put the laptop or phone on 2.4GHz while you do the setup. Some routers let you split the bands into two separate names, which makes this easy if the printer keeps giving you trouble. If your router does not allow it, moving further from the router during setup often pushes the device onto 2.4GHz on its own, because that band carries further.
Why it worked for a year and then stopped
Usually the printer’s network address changed. Your router hands out addresses on a lease. Devices normally get the same one back, but after a power cut, a firmware update, or a long holiday with the printer switched off, the lease expires and the address gets reused. The printer comes back as .112 instead of .87.
Your computer still has .87 written down. It sends the job there, gets no answer, and shows the printer as offline. Both machines are working correctly, but the computer is looking in the wrong place.
The permanent fix is a DHCP reservation. In your router’s settings, usually under LAN, DHCP, or Connected Devices, find the printer and reserve its current address. The router then always gives that printer the same one. It takes a couple of minutes and stops the problem coming back.
The alternative, setting a static address on the printer itself, works too, but reserving it at the router is tidier because everything is decided in one place.
Things that look like faults and are not
A stuck job blocking the queue. One failed document sits at the front and everything behind it waits. Open the print queue, cancel everything in it, and try a single fresh page. On Windows, if jobs refuse to clear, restarting the Print Spooler service clears them out.
Use Printer Offline, ticked. Windows has a manual offline mode that is easy to trigger by accident and looks exactly like a dead printer. It is in the printer’s menu in Settings, and it needs to be unticked.
Several copies of the same printer. After a few reinstalls you end up with the printer, the printer (Copy 1), and the printer (Copy 2). Windows often picks one that no longer works. Delete all of them and add the printer again once.
The wrong printer set as default. This is common on machines that also have Microsoft Print to PDF or a work printer installed, and the document goes to one of those instead.
When wired is the right answer
If the printer sits near the router or near the computer and the Wi-Fi has been a running battle, use a cable.
A network cable from printer to router removes bands, discovery and lease renewals from the equation in one go, and it costs a few dollars. If the printer never moves, you lose very little by going wired.
USB straight to one computer is the other simple answer, with the obvious catch that only that computer can print.
When it is time to replace it
On an older home printer, check the cartridge price first. Manufacturers sell printers cheaply and make the money on ink, and on older models a full set of genuine cartridges can approach the price of a current printer that includes a set. At that point a new printer is the cheaper option.
Before you buy, check whether the new one is on the same ink family, and whether it will still be sold in a few years. Buying a printer whose cartridges are discontinued a year later is how people end up doing this again sooner than they expected.
Paper jams, streaky pages and faded prints are almost never worth replacing a machine over. They are usually a clean, a head alignment, or one cartridge.