Uninstall Dell support assist.  I have multiple Dell desktop and laptops.  I removed support assist (preinstalled) when I found it intrusive and annoying and frankly useless. [URL]
This machine originally came with Win 7 Pro. I bought it used from a local dealer with Win 10 pro installed. I allowed it to update to the 21H2 version back on 1/4/2021. I had this issue a couple of months back and removed my external hard drives and it ran fine after. Last month it (the scan hardware test) ran fine. Today, I tried to run it after getting the notification to run the Support Assistant and the "scan hardware" feature hung up and quit. I tried running it two more times with the same result. 
OptiPlex 3010: Support assistant "scan hardware" fails