In the first billion years of the universe, stars and galaxies formed in the smallest dark matter halos, produced high-energy photons that reionized the intergalactic medium, and polluted the universe with the first heavy elements. Near-field cosmology probes this early era by observing nearby relic galaxies that have survived from ancient times. In particular, the elemental abundances of their old, metal-poor stars encode otherwise inaccessible information about the first stellar populations and first galaxy formation histories. Decoding these abundances requires connecting nuclear and stellar astrophysics to galaxy formation and hierarchical assembly. I will show how stellar abundances of metal-poor stars have shaped our current understanding of the rapid neutron-capture process (r-process), including how they inform future multi-messenger observations of kilonovae. The r-process can in turn be used to build our understanding of the high-redshift universe, including galaxy formation in the faintest dwarf galaxies and the hierarchical assembly of our Milky Way's stellar halo.