Demand for AI stocks powers tech giant’s shares, helping it become biggest group by market capitalisation