  Context. The recent detection of nitrogen-enhanced, metal-poor galaxies at
high redshift by the James Webb Space Telescope has sparked renewed interest in
exploring the chemical evolution of carbon, nitrogen, and oxygen (the CNO
elements) at early times, prompting fresh inquiries into their origins. Aims.
The main goal of this paper is to shed light onto the early evolution of the
main CNO isotopes in our Galaxy and in young distant systems, such as GN-z11 at
z=10.6. Methods. To this aim, we incorporate a stochastic star-formation
component into a chemical evolution model calibrated with high-quality Milky
Way (MW) data, focusing on the contribution of Population III (Pop III) stars
to the early chemical enrichment. Results. By comparing the model predictions
with CNO abundance measurements from high-resolution spectroscopy of an
homogeneous sample of Galactic halo stars, we first demonstrate that the
scatter observed in the metallicity range -4.5 < [Fe/H] <-1.5 can be explained
by pre-enrichment from Pop III stars that explode as supernovae (SNe) with
different initial masses and energies. Then, by exploiting the chemical
evolution model, we provide testable predictions for log(C/N), log(N/O), and
log(C/O) vs. log(O/H)+12 in MW-like galaxies observed at different cosmic
epochs/redshifts. Finally, by calibrating the chemical evolution model to
replicate the observed properties of GN-z11, we provide an alternative
interpretation of its log(N/O) abundance ratio, demonstrating that its high N
content can be reproduced through enrichment from high-mass faint Pop III SNe.
Conclusions. Stochastic chemical enrichment from primordial stars explains both
the observed scatter in CNO abundances in MW halo stars and the exceptionally
high N/O ratios in some distant galaxies. These findings emphasize the critical
role of Pop III stars in shaping early chemical evolution.
