Context. We present here an analysis of the potential sources of oxygen species in the Uranus atmosphere. Aims. Our aim is to explain the current measurements of H2O, CO, and CO2 in the Uranus atmosphere, which would allow us to constrain the influx of oxygen-bearing species and its origin in this planet. Methods. We used a time-dependent photochemical model of the Uranus atmosphere to ascertain the origin of H2O, CO, and CO2. We thoroughly investigated the evolution of material delivered by a cometary impact, together with a combined source, i.e. cometary impact and a steady source of oxygen species from micrometeoroid ablation. Results. We find that an impactor in the size range ~1.2–3.5 km hitting the planet between 450 and 822 yr ago could have delivered the CO currently seen in the Uranus stratosphere. Given the current set of observations, an oxygen-bearing species supply from ice grain ablation cannot be ruled out. Our study also indicates that a cometary impact cannot be the only source for rendering the observed abundances of H2O and CO2. The scenarios in which CO originates by a cometary impact and H2O and CO2 result from ice grain sublimation can explain both the space telescope and ground-based data for H2O, CO, and CO2. Similarly, a steady influx of water, carbon monoxide, and carbon dioxide, and a cometary impact delivering carbon monoxide give rise to abundances matching the observations. The time evolution of HCN also delivered by a cometary impact (as 1% of the CO in mass), when discarding chemical recycling of HCN once it is lost by photolysis and condensation, produces a very low stratospheric abundance which could be likely non-detectable. Consideration of N2-initiated chemistry could represent a source of HCN allowing for a likely observable stratospheric mixing ratio. Conclusions. Our modelling strongly indicates that water in the Uranus atmosphere likely originates from micrometeroid ablation, whereas its cometary origin can be discarded with a very high level of confidence. Also, we cannot firmly constrain the origin of the detected carbon monoxide on Uranus as a cometary impact, ice grain ablation, or a combined source due to both processes can give rise to the atmospheric mixing ratio measured with the Herschel Space Observatory. To establish the origin of oxygen species in the Uranus atmosphere, observations have to allow the retrieval of vertical profiles or H2O, CO, and CO2. Measurements in narrow pressure ranges, i.e. basically one pressure level, can be reproduced by different models because it is not possible to break this degeneracy about these three oxygen species in the Uranian atmosphere.