From the Apple () menu in the corner of your screen, choose About This Mac. You'll see the macOS name, such as macOS Mojave, followed by its version number. If you also need to know the build number, just click the version number. This example shows macOS Mojave version 10.14 build 18A391: Below are all Mac operating systems, starting with the most recent.
When a major new macOS is released, it gets a new name, such as macOS Mojave. And as updates to that macOS become available from the App Store or Software Update preferences, additional version numbers and builds are added to its table.