The second cell has double the energy storage as the first cell.
Really mAh is only useful when comparing cells of the same voltage. It became a common metric since so many battery cells in electronics are 3.7v, so you could assume a constant voltage and just compare mAh.
But not all cells are 3.7v, so sometimes that mAh comparison falls down completely and you should really be using watt-hours (milliamp-hours * volts).
Usually though, batteries are designed with a particular application in mind and that application will define a voltage that is acceptable, such as ~3.8V for phones or ~19V for laptops. Significantly above this would damage the device. Likewise, below that voltage and the device doesn't function. This is why mAh is a decent proxy for Wh; for a given application the voltage is fixed and so the conversion - for that application - is fixed. mAh for a given application can be compared easily.
Comparing batteries for different applications is harder, but not just because you have to convert mAh to Wh: different applications require different performance characteristics beyond just voltage. You might care about weight, physical dimensions, operating temperatures, discharge rates, charge rates, self-discharge rates, output impedance.
The problem starts with voltage because now you need each battery or battery set connected to have very close capacity or else it will be "wasted", and you need cell balancer to keep them equally charged.
For those who don't know, this is because losses scale as current squared, instead of just proportionally like it does with voltage.
For example, charging a power bank with 20W of power at 5V you need to supply 4A of current. If you have a good USB cable with 0.1 Ohm resistance, that results in P = V*I = (I*R)*I = (4*0.1) * 4 = 1.6W of loss in the cable[1].
If instead you could use 20V to charge, then the current would only need to be 1A and hence the loss just (1*0.1) * 1 = 0.1W.
Neither measure the "quality" of the battery.
What DOES have to do with quality, though, is the amount by which voltage falls as the load increases, or in other words, how efficient the battery is.
This is similar to the efficiency of a power supply in a computer.