This is the complete procedure that SHOUL have been down before sale:
What to do before you sell, give away, or trade in your Mac - Apple Support
The part you MUST do is to restart in Internet recovery USING Shift-Option-Command-R and re-install the MacOS version (tagged only with the serial Number of your Mac) that initially shipped on your Mac. You may have to ERASE the drive in Internet recovery before installing.
--------
You can not get any other versions, because: MacOS is tagged with the Apple-ID of the person who downloaded it (the seller) and without their password, you can not download anything new.