Restoring Factory settings to remove Malware

I recently did a factory reset after I discovered a virus. My PC uses SSD for the OS and internal HDD for storage. Can the virus copy itself to the storage HDD and migrate back to the SSD after the reset? If it can, how should I reset the drives? I am afraid that malware might still be there so how should I go about it?

here is the comlete guide :

Hello @Leslie

I just wanted to confirm that factory reset means format and install new Operating System or restore previous version.
If you did so then it is not the solution for removing malware.
You should have installed new Operating system and then installed and update antivirus in new Disk.
Now don’t worry, if you still did not update your anti virus
update anti virus and scan both the hard disks.
Good luck!!