Apple - How can I find the macOS version codename?
The version number is the correct thing to report when you have issues. You should also include the subversion.
The marketing names are from macOS - Wikipedia article, up to and including macOS Catalina.
╔════════════════════════════╦════════════════════╗
║ Version ║ Codename ║
╠════════════════════════════╬════════════════════╣
║ Rhapsody Developer Release ║ Grail1Z4 / Titan1U ║
║ Mac OS X Server 1.0 ║ Hera ║
║ Mac OS X Developer Preview ║ ║
║ Public Beta ║ Kodiak ║
║ Mac OS X 10.0 ║ Cheetah ║
║ Mac OS X 10.1 ║ Puma ║
║ Mac OS X 10.2 ║ Jaguar ║
║ Mac OS X 10.3 ║ Panther ║
║ Mac OS X 10.4 ║ Tiger ║
║ Mac OS X 10.5 ║ Leopard ║
║ Mac OS X 10.6 ║ Snow Leopard ║
║ Mac OS X 10.7 ║ Lion ║
║ OS X 10.8 ║ Mountain Lion ║
║ OS X 10.9 ║ Mavericks ║
║ OS X 10.10 ║ Yosemite ║
║ OS X 10.11 ║ El Capitan ║
║ macOS 10.12 ║ Sierra ║
║ macOS 10.13 ║ High Sierra ║
║ macOS 10.14 ║ Mojave ║
║ macOS 10.15 ║ Catalina ║
║ macOS 11.0 ║ Big Sur ║
╚════════════════════════════╩════════════════════╝
As of OS X 10.10 Yosemite, the name of the OS is listed in About This Mac.