The best way to prepare your computer for re-sale, and the only fair way, in my view, is to do what's known as a factory restore. This reverts your computer to exactly as it was when it left the factory, as if you had pressed the power button for the very first time.
Factory restore is a procedure created by the computer manufacturer specifically for your model, and therefore you'll find detailed directions on the manufacturer's website. Microsoft can't do a factory restore, obviously, since Microsoft doesn't know how your computer was setup at the factory or what other software was included by the manufacturer.
Whether this satisfies your need for privacy depends, quite frankly, on how paranoid you are. When you do a factory restore, your hard drive is effectively erased. To do this, the partition table in the BIOS (in older computers) or the UEFI is erased. So even though your hard drive is still filled with your old data, the new copy of Windows can't see it, can't find it and knows nothing about it. Windows is like me after three beers: completely oblivious.
The fact that your hard drive still holds your previously existing data, at least to the extent that it wasn't over-written by the new install, means that someone who has physical access to your computer, as well as access to the kind of software typically available to law enforcement agencies and the knowledge to use it, can still read your old data.
If that's something that concerns you, then you'll want to do a Hilary Clinton-style hard drive erasure, where even government agencies will have a hard time extracting the old data.
Then on the other hand, if the person who receives your computer knows about computers, they'll do a clean install anyway, since that's the only way that an acquirer knows for sure that the computer is free of problems, configuration mistakes and viruses.