Samsung reported strong second-quarter earnings results partially thanks to strong demand for the Galaxy S24 series.