The company crossed the market-cap milestone after its earnings report showed strong growth in its cloud-computing services, bolstered by demand for its AI offerings.