You CAN "go back" to the earliest OS that came with the Mac.
You do this by booting to a SPECIAL VERSION of "internet recovery":
Command-SHIFT-OPTION-R
at boot
(this will restore the earliest OS version that shipped with the computer, or the closest available version of that OS to it)
Once there, open disk utility first.
IMPORTANT: go to the "view" menu and choose "show all devices".
You need to erase the ENTIRE drive.
It should be "the topmost item" in the items on the left.
Erase to APFS with GUID partition format.
Then, quit disk utility and open the OS installer.
Start clicking through. The Mac will reboot one or more times, and the screen will go dark for a minute or longer with no other indication of activity. Be patient.
When done, you should see the initial startup screen.
At this point, try going to the menu to see if there's a "quit" option. If there is, choose it, then shut down.
If there isn't, just press AND HOLD IN the power-on button until the Mac shuts off.
It now should be ready for the new owner.
You did log it out of iCloud first (and other related things) before you began this process, right...?