The Answer by Bob Brown is correct but if all you want to do is remove password less sudo just delete the 010_pi-nopasswd file.
This can be done on a Linux computer.
You could also log in to a root shell on the Pi to delete the file.
You didn't do anything wrong during setup. By default, user "pi" can issue sudo commands with no password; that's the way Raspbian is released. If you haven't done very much other customizing, just re-flash the microSD card and start over.
If you really need to rescue the contents of the current card, flash a new card and boot the Pi from it. Put the ...