How to install a Mac OS on a Mac, from 2006 or later.
First off, you will need to verify the make and model year and season of your Mac, by looking at the serial number or EMC# on the bottom. Use the serial number on the check coverage page:
Check Your Service and Support Coverage - Apple Support
to lookup thein information. DO NOT post the serial number on Apple Support Communities, as that is personal identifyiable information.
Sometimes only the EMC# is visible. Several websites offer EMC# lookup. If in doubt, ask on the community or calling AppleCare.
July 22, 2011, Macs began to have a Mac App Store and built-in installer on boot called Recovery. The built-in recovery is installed with each each Mac OS 10.7 (Lion) and later, and a separate internet recovery is also available on Macs newer than that date.
Recovery will reinstall the OS from a partition that was created during a prior install and can be done on top of an existing OS install if you are missing components or you want to update to the latest release of the currently installed OS.
Internet Recovery will try to install the original OS that came with the Mac and has to be done on an empty partition formatted by Disk Utility first or external hard drive. There are different commands for the recovery depending on whether or not you are using a pre-2020 Mac, which is Intel, or 2020 or later Mac which is Apple Silicon:
Use macOS Recovery on an Intel-based Mac - Apple Support
Use macOS Recovery on a Mac with Apple silicon - Apple Support
Pre-July 22, 2011 don't necessarily have any recovery unless either the firmware
Computers that can be upgraded to use OS X Internet Recovery - Apple Support
Or Sierra or later were installed earlier.
Otherwise you will need the original installer disc that came with the Mac to install the OS, or if the Mac is older than March 15, 2010, a copy of Snow Leopard 10.6.3. retail to install. This retail disc looks like
and does not say upgrade/dropin/OEM.
Further directions to install a newer OS can be provided if we know they are needed.
Older Mac OSes can't be installed directly on top of newer OSes or on Macs that came with a newer OS. Directions to install each of the Intel and Apple Silicon OS are on each of the tips on the links below:
10.4 Tiger, 10.5 Leopard, 10.6 Snow Leopard(end of the line for PowerPC applications), 10.7 Lion, 10.8 Mountain Lion, 10.9 Mavericks and 10.10 Yosemite,10.11 El Capitan,10.12 Sierra, 10.13 High Sierra, 10.14 Mojave, 10.15 Catalina, 11.0 Big Sur 12.0 Monterey, 13.0 Ventura and 14.0 Sonoma