Intel struggled because they bet the company that Moore's law was over back in ~2014, and instead of upgrading their fabs to EUV they sent the money back to shareholders.
They forgot Moore's main lesson: only the paranoid survive. They thought they could coast, and it nearly killed them.