I am an ICU physician and have supervised plenty of code blue situations (doing CPR, using AEDs, etc)
It is absolutely remarkable that he is alive and speaking. The medics (and referee who stopped the game instantly) are absolute heroes. The survival rate after CPR is low, and survival with good neurological outcomes (like speaking and talking) is even lower. This happened with Eriksen because of the immediate action of the medics in administering early CPR and defibrillation.
He went into SCD (Sudden Cardiac Death) from VT/VF (Ventricular Tachycardia/Fibrillation). Typically in an otherwise healthy young person, it's due to structural heart disease (like Hypertrophic Obstructive Cardiomyopathy - HOCM). I'm not sure if players routinely get echocardiograms when signing for clubs, which would have identified this beforehand. It's not cost-effective in the general population but I am not sure about big clubs. It could also be due to genetic arrhythymia syndromes or less likely due to electrolyte abnormalities. In any case, he is going to get a battery of tests in the hospital and leave with an implanted defibrillator (ie, pacemaker).