We present a detailed study of the methodology for correlating `dark sirens (compact binaries coalescences without electromagnetic counterpart) with galaxy catalogs. We propose several improvements on the current state of the art, and we apply them to the GWTC-2 catalog of LIGO/Virgo gravitational wave (GW) detections, and the GLADE galaxy catalog, performing a detailed study of several sources of systematic errors that, with the expected increase in statistics, will eventually become the dominant limitation. We provide a measurement of $H_0$ from dark sirens alone, finding as the best result $H_0=67.3^{+27.6}_{-17.9},,{rm km}, {rm s}^{-1}, {rm Mpc}^{-1}$ ($68%$ c.l.) which is, currently, the most stringent constraint obtained using only dark sirens. Combining dark sirens with the counterpart for GW170817 we find $H_0= 72.2^{+13.9}_{-7.5} ,{rm km}, {rm s}^{-1}, {rm Mpc}^{-1}$. We also study modified GW propagation, which is a smoking gun of dark energy and modifications of gravity at cosmological scales, and we show that current observations of dark sirens already start to provide interesting limits. From dark sirens alone, our best result for the parameter $Xi_0$ that measures deviations from GR (with $Xi_0=1$ in GR) is $Xi_0=2.1^{+3.2}_{-1.2}$. We finally discuss limits on modified GW propagation under the tentative identification of the flare ZTF19abanrhr as the electromagnetic counterpart of the binary black hole coalescence GW190521, in which case our most stringent result is $Xi_0=1.8^{+0.9}_{-0.6}$. We release the publicly available code $tt{DarkSirensStat}$, which is available under open source license at url{https://github.com/CosmoStatGW/DarkSirensStat}.