Context. Complex organic molecules (COMs) are thought to form on icy dust grains in the earliest phase of star formation. The evolution of these COMs from the youngest Class 0/I protostellar phases toward the more evolved Class II phase is still not fully understood. Since planet formation seems to start early, and mature disks are too cold for characteristic COM emission lines, studying the inventory of COMs on Solar- System scales in the Class 0/I stage is relevant. Aims. Our aim is to determine the abundance ratios of oxygen-bearing COMs in Class 0 protostellar systems on scales of ~100 AU radius. We aim to compare these abundances with one another, and to the abundances of other low-mass protostars such as IRAS 16293-2422B and HH 212. Additionally, using both cold and hot COM lines, the gas-phase abundances can be tracked from a cold to a hot component, and ultimately be compared with those in ices to be measured with the James Webb Space Telescope (JWST). The abundance of deuterated methanol allows us to probe the ambient temperature during the formation of this species. Methods. ALMA Band 3 (3 mm) and Band 6 (1 mm) observations are obtained for seven Class 0 protostars in the Perseus and Serpens star-forming regions. By modeling the inner protostellar region using local thermodynamic equilibrium models, the excitation temperature and column densities are determined for several O-bearing COMs including methanol (CH3OH), acetaldehyde (CH3CHO), methyl formate (CH3OCHO), and dimethyl ether (CH3OCH3). Abundance ratios are taken with respect to CH3OH. Results. Three out of the seven of the observed sources, B1-c, B1-bS (both Perseus), and Serpens S68N (Serpens), show COM emission. No clear correlation seems to exist between the occurrence of COMs and source luminosity. The abundances of several COMs such as CH3OCHO, CH3OCH3, acetone (CH3COCH3), and ethylene glycol ((CH2OH)2) are remarkably similar for the three COM-rich sources; this similarity also extends to IRAS 16293-2422B and HH 212, even though collectively these sources originate from four different star-forming regions (i.e., Perseus, Serpens, Ophiuchus, and Orion). For other COMs like CH3CHO, ethanol (CH3CH2OH), and glycolaldehyde (CH2OHCHO), the abundances differ by up to an order of magnitude, indicating that local source conditions become important. B1-c hosts a cold (Tex ≈ 60 K), more extended component of COM emission with a column density of typically a few percent of the warm/hot (Tex ~ 200 K) central component. A D/H ratio of 1–3% is derived for B1-c, S68N, and B1-bS based on the CH2DOH/CH3OH ratio (taking into account statistical weighting) suggesting a temperature of ~15 K during the formation of methanol. This ratio is consistent with other low-mass protostars, but is lower than for high-mass star-forming regions. Conclusions. The abundance ratios of most O-bearing COMs are roughly fixed between different star-forming regions, and are presumably set at an earlier cold prestellar phase. For several COMs, local source properties become important. Future mid-infrared facilities such as JWST/MIRI will be essential for the direct observation of COM ices. Combining this with a larger sample of COM-rich sources with ALMA will allow ice and gas-phase abundances to be directly linked in order to constrain the routes that produce and maintain chemical complexity during the star formation process.