How to calculate the mass of phosgene in the equilibrium mixture of carbon dioxide and chlorine?

Consider the reaction:

$$\ce{CO(g) + Cl2(g) <=> COCl2(g)}$$

A closed $\pu{5.69 L}$ flask containing a reaction mixture at equilibrium has $[\ce{CO}] = \pu{1.8 \times 10^-6 M}$ and $[\ce{Cl2}] = \pu{6.3 \times 10^-7 M}$. Given that the equilibrium constant $K_\mathrm{eq} = 2.9 \times 10^{10}$, calculate the mass of $\ce{COCl2}$ present in the flask.

How can I solve the question above? I thought that equilibrium constants deal with concentrations and not masses, so I'm not sure how to use it to calculate a mass.

We have an equilibrium mixture for the reaction

$$\ce{CO (g) + Cl2 (g) <=> COCl2 (g)}$$

We should recognize that

$$K_\mathrm{eq} = \frac{[\text{products}]}{[\text{reactants}]} = \frac{[\ce{COCl2}]}{[\ce{CO}][\ce{Cl2}]}$$

Note that the reactants and products all have stoichiometric coefficients of 1 so we can write our $K_\mathrm{eq}$ equation out in this way.

Because we are given concentrations of reactants in the equilibrium mixture, we can go ahead and plug in the values that we know and solve for $[\ce{COCl2}]$.

\begin{align} 2.9 \times 10^{10} &= \frac{[\ce{COCl2}]}{(\pu{1.8 \times 10^-6 M})(\pu{6.3 \times 10^-7 M})} \\ [\ce{COCl2}] &= \pu{0.033 M} \end{align}

We are asked how many grams of $[\ce{COCl2}]$ is present in the reaction mixture. Concentration and mass are related via the following equation:

$$[\ce{COCl2}] = \frac{n(\ce{COCl2})}{V} = \frac{m(\ce{COCl2})}{M(\ce{COCl2}) \cdot V}$$

or

$$m(\ce{COCl2}) = [\ce{COCl2}] \cdot M(\ce{COCl2}) \cdot V$$

where $n$ is the amount of $\ce{COCl2}$ (in g), $M$ is the molar mass (in g/mol), and $V$ is the volume (in L).

Let us plug in all of our known values and solve.

\begin{align} m(\ce{COCl2}) &= (\pu{0.033 mol L-1})(\pu{98.906 g mol-1})(\pu{5.69 L}) \\ &= \pu{18.6 g} \end{align}