South Korea's Samsung Electronics Co Ltd turned in its best April-June profit since 2018 on Thursday, underpinned by strong sales of memory chips to server customers even as demand from inflation-hit smartphone makers cools.