Find your Mac model identifier with Terminal in Recovery
Apple's model identifier, also known as machine ID, can be found on the Terminal with:
system_profiler SPHardwareDataType
is the command available on Recovery mode on Lion (my series of tips that indicate which model identifier is compatible with which Mac OS upgrade) and later. When you Open the Terminal app and type this command followed by the Enter or return key, it will reveal all the primary hardware info about the computer.
Apple Silicon, late 2020 and later Macs, load recovery with these directions.
July 22, 2011 Macs up to that stage load recovery with command-R at boot.
A limited number of pre-2011 Macs offered recovery. Those that didn't require their original installer discs, or if older than March 15, 2010 and newer than January 7, 2006 also supported the last released Snow Leopard retail installer.
Additionally your hardware read out on the terminal will read your serial number. Apple has a Check Coverage page that will date your computer more precisely. Do not quote that number on the Support Community, as that can be key to your warranty and other personal information.
If you didn't come here via the identify your Mac user tip, returning to it, will help you get additional details.