Industrially, oxygen comes from filtering it out of the air--air is about 22% oxygen, after all. It's possible to do that on site, but the maintenance of the machine to filter it isn't really worth it compared to just ordering a new tanker of liquid oxygen every few days.
Another issue with breaking up water molecules is you need a fairly pure source of water to do that. The water in a water treatment plant is anything but pure.
The former is a thing. Some hospitals do on-site generation instead of trucking it in. If they’re extracting from air; seems like a waste of separated N2/argon/other gases, but the disintermediation might pay for it all.
https://www.class1inc.com/news.php?id=75
But the problem with COVID is that its peak capacity wasn’t designed for that much draw and they had to move patients elsewhere. Not even sure if they can store in the liquid state or accept deliveries in liquid.
As noted, the ozone process requires high-purity O2 as source stock. That's recovered from atmospheric air through one of several processes. My understanding is that cryogenic seperattion is the principle method (it's a bit like fractional distillation, but in reverse, seperating air into its constituent gasses based on their liquification temperatures).
There's also pressure-swing absorption and membrane technology (differential diffusion), as well as by-product availability from other processes (e.g., nitrogen production).
See:
https://www.aceee.org/files/proceedings/2007/data/papers/78_...
(I've known all this longer than you have. By as much as five minutes.)