Alphabet became the fourth company to reach a $4 trillion market capitalization after its shares rose on news that Apple selected Google’s Gemini for AI.