Microsoft’s market value momentarily surpassed that of Apple’s for the first time in years as the software giant deepens it AI presence.