Since you are giving it away, you should reinstall that Mac's originally installed operating system. Most likely, that will be Snow Leopard. Not High Sierra.
Follow these instructions; specifically, this particular one under Other macOS installation options described in How to reinstall macOS - Apple Support:
- On an Intel-based Mac, if you use Shift-Option-Command-R during startup, you might be offered the macOS that came with your Mac, or the closest version still available.
Failing that, use the original, grey System Install DVD included with that Mac, or a retail, white, Mac OS X Snow Leopard DVD obtained from a reputable aftermarket source.
Or, just give the Mac away in its present condition and let its new owner perform those steps.