Warning: Giant Game of Thrones spoilers are ahead.
Game of Thrones let fans believe right up to the end of season 8, episode 5 that maybe Jaime and Cersei Lannister would escape. Tyrion had previously arranged for a boat to be waiting for Jaime and Cersei to flee Westeros and start a life together. But, with the city collapsing due to Dany's dragonfire attacks, the escape routes from the castle were all blocked off. So that's where Jaime and Cersei died on Game of Thrones, in the depths of the Red Keep, with the building raining down upon them. The final shot of the duo is them holding each other as rubble buries them alive. And yes, you have to accept that this is how Cersei, the queen of the withering stare so powerful she ruled all of Westeros with it, died. With a careless wrong turn, a rush of tears, and her dying brother/lover in her arms.
If there was any question that they died (hey, we all have hopes and dreams), the showrunners answered it during the "Inside the Episode" that aired following episode 5. David Benioff said that the final shot was a callback to an earlier conversation Jaime and Bronn had about how they wanted to die. Jaime said he wanted to do so in the arms of the woman he loved. "This is it," Benioff said of the couple's episode 5 conclusion. "Once [Jaime] goes through the various exits and they're all clogged up with rubble and there's no way out and he knows there's no way out, he's just trying to calm down the woman he loves because he knows this is it."
With their fate sealed, Jaime told Cersei look at him. "Nothing else matters," he said. "Only us." They embraced as the ceiling caved in above them. Co-showrunner D.B. Weiss pointed out in the episode commentary that the siblings were twins, so their fates were kind of always intertwined. Weiss said Jaime "knows that they belong together, that they came into this world together, that they need to go out of this world together."
Both Cersei and Jaime were likely going to die anyway. Jaime would have eventually succumbed to the stab wounds Euron Greyjoy inflicted and Cersei would have died by dragonfire or building rubble or some other effect of the war. They could have easily died alone, but Jaime pushed through to find his sister. He tried to rescue Cersei until there was no way to do so. And, at that point, he just comforted her the best he could.
Many fans wanted Jaime to fulfill the book's valonqar prophecy that said Cersei would die at the hands of a "little brother." But that part of the prophecy was purposely left out of the show. It seems the showrunners wanted to give Cersei and Jaime a romantic ending (or as much of one as you can have when you're committing twincest and you die via building collapse). They didn't want Jaime to kill his one true love, even if that one true love was his often callous, conniving sister. In a way, he contributed to her death because he led her down into the Red Keep where she would eventually be crushed by rubble. But valonqar prophecy fulfillment? That's not where the show went with things. Like it or not, the Lannister twins are dead for good and wherever their souls are, they ended it all together.