This one is going to be (appropriately) maddening. So Loki, like Heimdall, dies at the hands of Thanos at the beginning of Avengers: Infinity War. However, in Endgame, the timeline gets very screwy. Originally in 2012, Loki was apprehended and taken back to Asgard. But then the 2018 Avengers screwed with the timeline and Loki escaped with the Space Stone, a problem the Avengers never resolved (Cap and Iron Man just go further back in time and retrieve the Space Stone from the 1970s).
We now have a Disney+ series on the way starring Loki, but we don’t know what it’s about, or even when it takes place. So maybe Loki is dead, but maybe, by virtue of being part of a screwed timeline, he’s alive. It’s Schrödinger’s Loki.