Leia's death is likely meant to be from the strain of using the force to speak to Ben from across the Galaxy, just like Luke's astral projection from The Last Jedi.
However, an interpretation that's more interesting for the story is that calling Ben just made her weak, and Rey accidentally killed her when she stabbed Ben. Maybe she felt the same pain that Ben felt, or it forcefully cut the connection, but either would act like a mental attack that would be too much for her when she's already weak.
To me, thinking about it this way makes the movie more enjoyable and adds a bunch of context and depth to the scene.
First, she was already dying and tried to call her son to give a final goodbye, but Rey cut the conversation short before she could say anything.
Second, the whole movie Rey has been worried about falling to the dark side and hurting those close to her. In this battle, she was attacking out of anger and stabbed Ben when he was distracted, exactly like a Sith. She even stabbed him with a Sith's lightsaber, and then immediately felt her spirit fade. It's literally her fear become real.
This explains why she heals Ben and tries to run away afterward. She felt guilty for denying them a last conversation, and ran to prevent being consumed by the dark side.
This interpretation adds tragedy to the story and has Rey experience actual failure and loss, with real consequences for the characters. It even helps move along Rey's character arc more organically than before, and it adds more depth to her character than the previous 2 movies combined.
In a movie trilogy where most things just seem to happen, usually without spending much time to give most of it any real depth, seeing it this way makes the whole trilogy more fun to watch for me.