“About This Mac” is fine with a mouse. Over SSH, or in a script that logs which machine it ran on, the terminal version is easier.
system_profiler SPHardwareDataType
That prints the hardware overview, with the machine model, its name and the serial number. I own a MacBook Pro with an M5 Pro, and this is the quickest place to read the exact model when a support page asks for it.
There are many more data types. List them with:
system_profiler -listDataTypes
SPSoftwareDataType and SPPowerDataType are two others you can ask for by name. For scripts, -json gives you JSON to pipe into jq:
system_profiler -json SPHardwareDataType
Sharing a report on a forum? Use -detailLevel mini, which the man page describes as a report with no personal information.
Caveats. Progress and error messages go to stderr and the report to stdout, so add 2>/dev/null in scripts. A full report without a data type takes a while; there is a -timeout, 180 seconds by default, after which you get a partial report. And the serial number is something I’d cut out before posting output anywhere public.
Further reading: system_profiler man page (Apple, mirrored), system_profiler reference (ss64)