Both Sony RX100 IV and Sony RX100 VII have 20.0 MP resolution sensors but Sony RX100 IV's sensor is 1" (13.2 x 8.8 mm ) and Sony RX100 VII's sensor is 1 (13.2 x 8.8 mm ).
Since Sony RX100 VII's has a larger sensor area with the same resolution, this means that it also has a larger pixel area hence better light collecting capacity for a given aperture compared to Sony RX100 IV.
Below you can see the RX100 IV and RX100 VII sensor size comparison.
Sony RX100 IV and Sony RX100 VII have sensor sizes so they will provide same level of control over the depth of field when used with same focal length and aperture.
DxOMark Sensor Scores
Both Sony RX100 IV and Sony RX100 VII sensors have been tested by DxoMark. DxoMark scores camera sensors for color depth (DXO Portrait), dynamic range (DXO Landscape) and low-light sensitivity (DXO Sports), and also gives them an overall score. Of the two cameras that we are comparing, RX100 IV has scored 70, 7 points higher than RX100 VII.