Elastic Weight Consolidation (EWC) prevents catastrophic forgetting by adding a regularization term to the loss function, which penalizes changes to parameters deemed important for previous tasks. This importance is precisely quantified by the Fisher Information Matrix (FIM), estimating each parameter's contribution to past task performance.