When you say accidentally erased do you mean you completely wiped the drive of all of it’s data to include the OS? Or do you mean you reset it to a fresh install of Windows with all of your personal data gone?
When you say accidentally erased do you mean you completely wiped the drive of all of it’s data to include the OS? Or do you mean you reset it to a fresh install of Windows with all of your personal data gone?
If it’s completely erased then there’s no way to factory reset it. The data is gone. If you made a recovery disk then you could boot from that and restore your data.
If not then you need to download the Windows 10 Media Creation Tool to a USB drive. Boot from the USB drive and let it download Windows 10 to your hard drive. You’ll be able to start over from there but you will need to reinstall any programs you had before.