With the right driver, your HP DeskJet 2050 J510 will continue to be a reliable workhorse for years to come, even on the latest version of Windows 10.
Once on the driver page: