A selloff in some of the world’s largest technology companies dragged down stocks, extending a slide that was also driven by geopolitical angst and bets the Federal Reserve will opt for a smaller rate cut next month.