General Motors reported second-quarter earnings that beat Wall Street’s estimates, despite ongoing uncertainty from President Donald Trump’s auto tariffs.