Yes, diagnostics code of 2000-0142 indicates a hard drive error/failure during test.  It's common for hard drive health be degrade or failure after 5 years of use.  Since you are able to access and move data, lets retrieve everything you need from the drive.  Then, discard or re-use is up to you. You can clean the drive afterward using diskpart tool and continue to use it for non-essential storage until it dies.  Or run clean all to scrub the drive for discard.
So my XPS 8930 (bought in July 2018) died, it would give 2 quick Amber LED burts on power button separated by a few seconds to another Amber LED and then repeat. Dell support says it's a motherboard failure and 8930 is too old for them to even sell me a replacement motherboard. So left with no choice but to buy a new XPS8950 which came with 500 GB SSD as boot and 1 TB 3.5" HDD in the first disk cage at the top of the chassis So now I have to salvage my data from old 8930, so I took out its 1 TB disk mounted under the DVD disk drive. I thought it was the boot disk. Checked it using an external USB SATA disk kit - it's mostly a RAW partition and 3 other recovery partitions - that was strange as I thought that location is for the boot disk. Took out its 2TB disk (3.5" ST2000DM006-2DM164)  from its cage at the bottom of the chassis and it shows 0.9 TB Windows 10 partition and 1TB Data partition and 1 hidden system partition and I can access everything, so I put that 2TB inside the new 8950 and it boots up fine and I can move my data. Also ran the Diagnostics from the new 8950 BIOS on this setup. It ran fine except to show this error on the 2 TB disk, I resumed the test and it finished without any further error/warning DIAG06/14/2023 21:31:50Fail ED.3.2.1 Error:2000:0142 Validate code:97285 Disk 2 - S/N Z4Z84W4Y, Short self test unsuccessful. Does it indicate something wrong with the health of the old 2TB?
XPS 8930, 2TB 2000-0142 error