Hello,
You can use the AI answer to perform the factory reset, but when the reset is done, simply turn it off, do NOT set up the computer. That way the new owner just needs to turn on the computer and it will prompt them to set up the computer with their own account.
If the reset from AI doesn't work, it can be due to recovery partition being corrupted or not existing, then you need to do a clean install.
The following steps should be done on a working Windows computer:
Download the Windows Media Creation Tool from Microsoft's official website. https://www.microsoft.com/software-download/windows10
Run the tool and select "Create installation media for another PC."
Choose your language, edition, and architecture (32 or 64-bit) and select "Next."
Choose "USB flash drive" as the media to use for the installation and select "Next."
Connect a USB flash drive with at least 8 GB of free space to your computer.
Select the USB flash drive you want to use, and then select "Next."
The tool will then download the required files and create the installation media.
=====================================================
Now these steps will be done on your problematic computer:
Go to the computer's BIOS boot menu to have it boot from the USB drive.
Follow the on-screen instructions to install Windows 10, making sure to choose "Custom install" and select the option to delete all existing partitions.
Once the installation is complete, you'll have a clean installation of Windows 10 on your computer. Once again, you can be done here, no need to set up for the new user.