Government data shows gross domestic product growth slowed in the second quarter from earlier in the year, even though it rose over the same period in 2022.