Is the Mac operating system free, unlike Windows?
macOS comes with every Mac at no extra cost, and Apple gives free updates, including major versions, for as long as it supports that Mac, usually 5 to 7 years. You can't buy macOS to run on a non-Apple computer. The license comes with the hardware.