Apple and Meta powered the Nasdaq’s sizzling rally in July, helping the tech-heavy index wrap up a 5-month winning streak