That isn't how solar capacity is measured. It's not simply its maximum instantaneous power potential
It's close enough to how it's measured. China's terawatt of solar power capacity isn't producing 9000 terawatt hours in a year. Their total electricity use is 9000 terawatt hours.
It is how individual power generation projects and measured though. If you install a GW of solar generation, it means you installed solar panels capable of generating 1 GW peak. If you install a 1 GW of coal generation, then same thing. If you install 1 GW peaker gas plants etc.
The coal plant will have a capacity factor of 80% though. Solar will be 10 to 20%. And the gas plant could be very low due to usage intent.
Battery projects are the same (since they're reported as generators). Whatever nameplate capacity...for about 4 hours only.
There are multiple measures, as generating technologies are complex. "Nameplate capacity" (given above) is one, "capacity factor", which is (roughly) the time-averaged output is another, and for solar averages about 20%, though that can vary greatly by facility and location.
Nuclear has one of the highest capacity factors (90% or greater), whilst natural gas turbines amongst the lowest (<10% per the link below). This relates not only to the reliability of the technologies, but how they are employed. Nuclear power plants cannot be easily ramped up or down in output, and are best operated at continuous ("base load") output, whilst gas-turbine "peaking stations" can be spun up on a few minutes' notice to provide as-needed power. Wind and solar are dependent on available generating capability, though this tends to be fairly predictable over large areas and longer time periods. Storage capability and/or dispatchable load make managing these sources more viable, however.
<https://en.wikipedia.org/wiki/Nameplate_capacity>
<https://en.wikipedia.org/wiki/Capacity_factor>