Micron’s stock has soared this year while its tech peers have struggled, as the impact of rising memory costs ripples across the industry.