I was trying to factory reset my Lenovo PC
Did you try this as a windows reset
or a builtin Lenovo reset
Model and serial number of lenovo would help
Or as Bruce suggest a fresh install gets rid of everything
And since you are selling it when you reinstall windows do not connect to the internet so you won't be setting it up with your account
Reinstall Win 10 Fresh Install
Download the win 10 tool run it to recreate the flash drive – Must be minimum 8GB
https://www.microsoft.com/en-au/software-download/windows10
Watch this video
How To Install Windows 10 From USB - YouTube
In the video at 2:54 you will notice it restarts the computer.
When you are doing this and you get to that point Remove the usb stick whilst it is restarting.
Also if you want to setup a local account instead of logging in with a Microsoft account
Turn off your wireless network and or remove the network cable.
This point is 3.32 in the video - Choose I don't have internet.
If you want to log in with a Microsoft account then leave the network as is.
Before doing any install, it is a good idea to go to the support page for your system. Download the drivers you are going to need ie chipset, sound, video, wireless, etc. While win10 has a lot of native drivers, microsoft drivers are designed for ease of use and are NOT designed for any type of performance. Store these drivers on another usb or you can even just make a folder on your install usb when you are finished making the install usb. Copy the drivers into that folder.
When you are finished with the install, then install your drivers. Install the chipset first then the rest of them. Reboot each time when prompted.
From here a list on how to install
https://www.labnol.org/software/device-drivers-installation-order/14310/