Nearing the end of the film, Charlie’s diagnosed with congestive heart failure, which leads Charlie on an eating binge.

At the very end, Charlie is dying. In an attempt to stand while he and Ellie are having a moment together, Charlie dies. In a way that Aronofsky often does to integrate the spiritual and religious imagery that’s present in his movies, he has Charlie ascend to heaven.

Source: https://www.distractify.com/p/does-charlie-die-in-the-whale