After a huge battle full of physical prowess and massive damage to both Grace and Carl, two key things happen. First, after their military grade EMP is destroyed, Grace sacrifices herself to provide Dani the power core that powers her cybernetic augmentations. After Dani stabs her would be assassin with said power core, Carl drags the crippled Rev-9 down a huge hole in the hydro-electric dam. With his final words, “For John,” aimed at Sarah Connor, the explosion from the device kills both machines, leaving Dani and Sarah as the surviving parties.
Article source: https://www.cinemablend.com/news/2483605/terminator-dark-fate-how-it-ended-and-how-the-film-changes-the-franchise