They still pay for licensed capacity when running things like z/OS. The machine is shipped "full" but the hardware has to be activated by paying a license.
One of the interesting features I heard when they launched z15 was that, if one needed to restart a partition, it could tap unlicensed CPUs to start faster and then go back to its licensed capacity.
I don't know the details of billing these days; it's been a while since I followed the space. But when Linux came out on Z, it ran on something called IFLs. These were not AFAIK physically different from the processors running more traditional IBM workloads. They were simply priced at a lower level. I don't remember if there was capacity on demand for Linux workloads or not.
IIRC, that's still true. I think IBM mainframes are typically leased, and the customer is billed on usage.
There's some complexity to this, where I think the metering only applies to programs in the "traditional" mainframe environment, while things running on the mainframe Linux environment are exempt from metered billing.