Apple traded higher despite lawsuits from Elon Musk’s X and xAI, which along with OpenAI were accused of running an anticompetitive scheme.