To prepare that device for selling, you need to perform the Windows reset, then choose to delete everything, and at the end of the reset, ensure you do not log into Windows with your Microsoft account.
At the end of the reset process, when you reach the setup section to add the Microsoft account, force the PC to shut down by pressing and holding the power button on the case of the PC for 5 - 10 seconds, then when the new owner starts the device, they can add their own Microsoft account details for the new account after the reset.