Try this:
Boot to INTERNET recovery:
From a powered-off state...
Press the power-on button, and then...
IMMEDIATELY hold down "Command-OPTION-R" and KEEP HOLDING THEM DOWN for a while.
If you are connecting to the net via wifi, you'll need your wifi password.
Enter it when asked.
Or... when you see "the spinning globe", let go of the keys above.
The internet utilities take a while to load, so be patient.
IMPORTANT QUESTION:
You don't care if the entire drive gets erased?
If not, then continue on.
Once the utilities are loaded, open disk utility.
CHECK THE MENU BAR to see if there is a "view" menu.
If there IS, you MUST go to it and choose "show all devices".
(if there IS NOT a view menu, don't worry, just continue).
Look at "the list on the left".
The topmost item should be the internal drive.
Click on it, and then click erase.
Erase it to APFS, GUID partition format.
Now quit disk utility and open the OS installer.
Start clicking through the OS installer.
The Mac will reboot one or more times, and the screen will go dark and stay that way for a minute or more. Be patient.
When done, you should see the initial setup screen.
At this point, it's ready to give away and let someone else set it up "for the first time".
Try "Command-Q" to quit the installer and then shut down.
IF that doesn't work, just reach around and hold down the power-on button until the screen goes dark and the Mini shuts down. It's now "ready for the next owner".
Good luck.
A little more:
These days, 4gb of RAM "is no longer enough".
The new owner should buy ONE 8gb DIMM, take the back cover off, and replace the "topmost" 2gb DIMM with the 8gb one. That will give 10gb of installed RAM, and make it much more usable.
The new owner could also pick up a 512gb or 1tb USB3 SSD (such as the Samsung t7 shield), and plug that in and set it up to be the "new boot drive". It will run considerably faster!