Better here is subjective. Depends on what headphones / earphones we pair with. I have a s8 and iPhone 7. IPhone has more mids. S8 is more neutral. Samsung lacks power driving power for over ear headphones in comparison to iphones. But with in ears, it's good enough. Samsungs background is cleaner than iphones though. Also it's more airy. But with over ears, it needs an amp in the chain. S8s sound profile is very similar to ODAC with less details and less darker background. IPhone is more midfocussed in comparison.Both Samsung and LG have started implanting high quality components in their flagship phones. I have an old S7Edge with lots of music and the onboard DAC sounds much better than the 2 iPhones that i have.
So depending upon on complimentary headphones one sounds better than the other. There is no absolute here.