It doesn't.
Killing He Who Remains at the Citadel at the End of Time will not change the past. What does change is the Time Variance Authority’s (TVA) operation, which is responsible for pruning timelines that deviate from the Sacred Timeline. The TVA is outside of regular space and time, so the concepts of the “past” and the “future” are irrelevant from the TVA's perspective.
To put it another way, He Who Remains was the one who created and ran the TVA. Without him in charge, the TVA falls apart. This became evident in Loki Season 2, where we see that after He Who Remains’ death in Season 1, the TVA staff are divided between those who want to continue pruning timelines and those who oppose it, preferring to spare trillions of lives, causing a coup d'état of sorts.
He Who Remains’ death also made Miss Minutes disappear from the TVA. She “took care of everything [in the TVA]” (according to Ouroboros), including core TVA machinery such as the temporal loom (designed by He Who Remains), “where raw time is refined into physical timeline”. Without He Who Remains and Miss Minutes, the temporal loom got overloaded by the many unpruned branches that grew when the TVA stopped pruning them, which could cause a “temporal meltdown”.
The reason why He Who Remains, via the TVA, was pruning timelines in the first place was to prevent “an infinite amount” of Kangs from emerging and waging a multiversal war against each other, as Miss Minutes and He Who Remains explain in Loki Season 1. Sylvie killing He Who Remains at the Citadel at the End of Time hinders the TVA from pruning new branches, unleashing new Kang variants, who will now try to conquer the different timelines.
Relevant dialogue:
He Who Remains: You kill me and destroy all this, and you don't just have one devil, you have an infinite amount.
He Who Remains: You kill me and the Sacred Timeline is completely exposed. Multiversal War.
Or you take over and return to the TVA as its rulers.
- Loki Season 1 Episode 6 "For All Time. Always."