  We use the gravitational wave (GW) events GW170817 and GW190521, together
with their proposed electromagnetic counterparts, to constrain cosmological
parameters and theories of gravity beyond General Relativity (GR). In
particular we consider models with a time-varying Planck mass, large
extra-dimensions, and a phenomenological parametrization covering several
beyond-GR theories. In all three cases, this introduces a friction term into
the GW propagation equation, effectively modifying the GW luminosity distance.
We set constraints on $\Lambda$CDM parameters and GR deviation parameters using
two sets of priors on the Hubble constant and matter energy density. With
priors set to the measured Planck's mission values, we find that with the
inclusion of GW190521, the two GR deviation parameters constraints improves by
a factor $\sim 10$, we report a number of spacetime dimensions compatible with
$4$ with an precision of $2.5\%$ (at 95\% CL) and an upper limit to the
variation of Netwon's constant at the epoch of GW170817 $<20\%$. With wide
priors on the Hubble constant and matter energy density, we show that it is
still possible to constrain the $\Lambda$CDM parameters and GR deviation
parameters conjointly from GW170817 and GW190521 obtaining constraints on GR
deviation parameters which are a factor $2-6$ worse than the results using
restricted priors on $\Lambda$CDM parameters.
