  Recent cosmological observations have provided numerous new observations with
increasing precision that have led to the era of precision cosmology. The
exquisite quality of these observations opens new possibilities towards
measuring fundamental constants with good precision and at scales which are
complementary to the laboratory ones. In particular, the cosmic microwave
background (CMB) temperature and polarization spectra contain a wealth quantity
of information, well beyond the basic cosmological parameters. In this paper,
we update the precision on a cosmological determination of $G$ by using the
latest Planck data release (PR4) in combination with the latest baryon acoustic
oscillation (BAO) from the Dark Energy Spectroscopic Instrument (DESI) data
release 1. We demonstrate a precision of $2.1\%$, corresponding to a $\sim25\%$
improvement compared to the literature. This measurement is compatible with
laboratory ones within one standard deviation. Finally, we show that this
cosmological measurement of $G$ is robust against several assumptions made on
the cosmological model, in particular when considering a non-standard dark
energy fluid or non-flat models.
