  Massive stars rotate faster, on average, than lower mass stars. Stellar
rotation triggers hydrodynamical instabilities which transport angular momentum
and chemical species from the core to the surface. Models of high-mass stars
that include these processes predict that chemical mixing is stronger at lower
metallicity. We aim to test this prediction by comparing the surface abundances
of massive stars at different metallicities. We performed a spectroscopic
analysis of single O stars in the Magellanic Clouds (MCs) based on the ULLYSES
and XshootU surveys. We determined the fundamental parameters and helium,
carbon, nitrogen, and oxygen surface abundances of 17 LMC and 17 SMC
non-supergiant O6-9.5 stars. We complemented these determinations by literature
results for additional MCs and also Galactic stars to increase the sample size
and metallicity coverage. We investigated the differences in the surface
chemical enrichment at different metallicities and compared them with
predictions of three sets of evolutionary models. Surface abundances are
consistent with CNO-cycle nucleosynthesis. The maximum surface nitrogen
enrichment is stronger in MC stars than in Galactic stars. Nitrogen enrichment
is also observed in stars with higher surface gravities in the SMC than in the
Galaxy. This trend is predicted by models that incorporate chemical transport
caused by stellar rotation. The distributions of projected rotational
velocities in our samples are likely biased towards slow rotators. A
metallicity dependence of surface abundances is demonstrated. The analysis of
larger samples with an unbiased distribution of projected rotational velocities
is required to better constrain the treatment of chemical mixing and angular
momentum transport in massive single and binary stars.
