The first direct detection of gravitational waves from compact binary coalescences has opened a new and complementary window onto the Universe. These signals encode insightful information about their sources, enabling precise measurements of compact object properties and their populations, tests of general relativity, and novel probes of fundamental physics. In particular, gravitational-wave observations provide direct measurements of luminosity distances, allowing for a three-dimensional mapping of merger events which, when combined with redshift information from different channels, enables independent constraints on cosmological parameters through standard siren methods. With current ground-based detectors already having observed hundreds of events, the upcoming era of third-generation observatories, such as the Einstein Telescope, is expected to increase detection rates to hundreds of thousands per year. This dramatic improvement in sensitivity and statistics will enable high-precision cosmology, while simultaneously introducing new challenges related to signal overlap and the presence of unresolved astrophysical foregrounds. In this thesis, we investigate the potential of third-generation gravitational-wave detectors for cosmological inference, with a particular focus on the Einstein Telescope. We begin by assessing how different Einstein Telescope configurations and layouts impact detector performance, including sensitivity, sky localization, and parameter estimation accuracy, and how these factors propagate into cosmological measurements. Building on this, we develop a comprehensive forecasting framework that integrates detector response modeling and parameter estimation techniques based on Fisher matrix analyses. Particular emphasis is placed on comparing detector network configurations, including global networks and contingency scenarios with reduced sensitivity, to assess how network geometry and availability impact localization and parameter estimation. Within this framework, we explore multiple standard siren approaches, and quantify their respective capabilities in constraining cosmological parameters. Using simulated populations of compact binary mergers, we show that third-generation detectors can achieve percent-level precision on key parameters such as the Hubble constant, the dark energy equation of state, and modified gravitational-wave propagation parameters. Finally, we address the characterization of astrophysical foregrounds arising from unresolved compact binaries in the search for a stochastic gravitational-wave background of cosmological origin. By modeling the astrophysical contribution in a specific global network configuration, we show that the imperfect subtraction of reconstructed binary black hole signals does not affect the search of underlying backgrounds, while neutron stars foreground contamination constitutes a mild yet non-negligible limiting factor, and that the detectability of a cosmological background critically depends on the filtering strategy adopted in the analysis. Overall, this work highlights both the potential of next-generation gravitational-wave observatories for precision cosmology and the methodological challenges that must be addressed to fully exploit their scientific capabilities.