Shares of Meta and Amazon skyrocketed Friday to multiyear highs after the technology giants each reported blowout earnings, capping the firms’ dramatic recoveries from their 2022 nadirs as some of their big tech stock peers have been relegated to the sidelines.