Both Nikon S3500 and Canon ELPH 180 have 20.0 MP resolution sensors but Nikon S3500's sensor is 1/2.3-inch (6.16 x 4.62 mm ) and Canon ELPH 180's sensor is 1/2.3 (6.17 x 4.55 mm ).
Since Nikon S3500'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 Canon ELPH 180.
Below you can see the S3500 and ELPH 180 sensor size comparison.
Nikon S3500 and Canon ELPH 180 have almost the same sensor size, so neither of them has any significant advantage over the other in terms of providing control over depth of field when used with the same focal length and aperture.