A measurement is presented of the cross section in proton-proton collisions for the production of two W bosons and one Z boson. It is based on data recorded by the CMS experiment at the CERN LHC at center-of-mass energies s=13 and 13.6 TeV, corresponding to an integrated luminosity of 200 fb−1. Events with four charged leptons (electrons or muons) in the final state are selected. Both nonresonant WWZ production and ZH production, with the Higgs boson decaying into two W bosons, are reported. For the first time, the two processes are measured separately in a simultaneous fit. Combining the two modes, signal strengths relative to the standard model (SM) predictions of 0.75−0.29+0.34 and 1.74−0.60+0.71 are measured for s=13 and 13.6 TeV, respectively. The observed (expected) significance for the triboson signal is 3.8 (2.5) standard deviations for s=13.6 TeV, thus providing the first evidence for triboson production at this center-of-mass energy. Combining the two modes and the two center-of-mass energies, the inclusive signal strength relative to the SM prediction is measured to be 1.03−0.28+0.31, with an observed (expected) significance of 4.5 (5.0) standard deviations.