How do ER models store more fuel?
Not all fuel is stored in the wings. Some is also stored in the fuselage. The ER variants have a larger, or additional, centre (fuselage) tanks at the expense of cargo bays volume.

The centre tank is located between the wings to minimize the change in centre of gravity as the fuel is consumed. The wing spar, which must go through to provide sufficient structural strength, does not allow the cargo bay to be continuous in most designs anyway.

The ER models may be also fitted with more powerful engines to increase the maximum take-off weight (engine out performance is usually the limiting factor), so the plane can still take reasonable amount of payload when the tanks are full.