https://helpdeskgeek.com/how-to/xp-to-windows-7-8-10-printer-sharing/
Click Add a printer
Next choose Add a local printer. Yes, that sounds counter-intuitive, but this is what you have to do!
Next, click Create a new port and choose Local port from the list of options.
Click Next and in the Port name box, type in the path to the shared printer. It should be something like \\Aseem\HPXP, where Aseem is the name of your XP machine and HPXP is the shared name of the printer.
In our case it may be \\copyroom\XeroxColor
Now choose the printer driver from the list or download the latest driver for the printer and choose Have Disk. Note that if you printer is a little older, it’s a good idea to download the Windows 7/8/10 driver for the printer and before clicking Have Disk.