I've once heard in a youtube channel that only games could do things such as: getting the player into a flux state (something like getting into a meditation while doing something) and when that happens, you have reflexes and movements that you did'nt even thought you have. Movies, on the other hand, has powerful visual and music appeal. I got myself wondering, "which are the things that only literature could do or do better at?"
I disagree with Amadeus on the matter of becoming the protagonist. I don't think that is what literature does or why readers turn to literature. I think there is always a narrative distance. We are always hearing a story told, and that is a different thing from doing something yourself. If I read about a character having a fight, for instance, it is not because I want to be in a fight. If I wanted to be in a fight, I would go dive bar and knock over a Harley. So in reading about a character having a fight, I am looking for a different kind of experience.
That experience, the experience of story, is a little hard to pin down, which is, I suppose, to say that it is a thing in itself, not a substitute for anything else. It is certainly a kind of experience, but it is also an experience at a distance from the dangers and inconveniences of real experiences. Is it just the safety that stories offer as opposed to reality? I don't think so.
In part, a story allows us to experience the lives of others. It allows women to experience the lives of men, men the lives of women, children the lives of adults and adults the live of children. It allows people of one race and culture to experience the lives of other races and cultures. (This applies as much to the author as to the reader, by the way, since the author must try to put on every member of their cast, young, old, rich, poor, male, female, etc. as they craft their story.) As social animals, we are very much interested in the lives of others and stories seem to be one of the main ways we are able to enter into those lives and thus perhaps understand them better and feel less alone.
But another function of stories is as an antidote to, or a comfort in the face or, or even as a rebuke to, the randomness of life. There is a moral order to stories that we do not necessarily find in the real world. Virtue is rewarded and vice punished. Heroic failure is given dignity and meaning. The thought that our lives are just accidents of fate is intolerable to us. Religions are essentially stories that make lives meaningful. (Which is not to say that one of them, at least, may not be a true story.) But even those who acknowledge no God use stories to create sense and order in their lives. Stories thus seem to fulfil not just a social need but an existential need in us as well.
I have discussed this in terms of stories rather than literature. Literature is a bit of a slippery term and not every story is regarded as literature nor every piece of literature as a story. But I think the answer to the question lies in stories, and in the fundamental needs that they meet for human beings: our need to understand the other, and our need to make sense of our lives.
EDIT: To address the secondary question of whether there is something prose (again I am avoiding the slippery word literature) can do that other media cannot. Prose can, as EM Forster points out in Aspects of the Novel, show that which cannot be seen on the surface. The show vs tell doctrine encourages us to show a character's thoughts and emotions through their actions, but Forster points out that not all thoughts or emotions show through action. There are things that people keep inside, and these are often the most important things about a person. Unlike other story media, prose can take us to places and show us things that can neither be seen nor heard.
This is mostly an opinion based question. So IMO, only in literature can the audience convincingly "become" the protagonist with all of their internal thoughts and feelings, faith and belief.
I don't think film can convey this to the same extent as literature, especially (paradoxically) in the senses: A film can show you a majestic mountain vista, but dialogue is limited and cannot be very poetic. The film does not have to describe it, because it is showing it. But different people experience the same image or landscape differently, through the lens of their own life experiences.
Thus, they are not experiencing it through the lens of the protagonist's life experience, as they are in a novel. The same thing goes for other senses, like music, or luxury, or physical hardship, or even sex, and the film cannot punch the pause button so the hero can describe what she is feeling. The book does that naturally, through prose and exposition that reveal their true emotions and feelings.
There is literally nothing that only one thing can do. There are people who orgasm when they are beaten. The claim that "only games can get the player into a state of flow" is the most vile nonsense I have ever heard. Maybe it is true for the person who said that, and I am very sorry for him. I can get in a flow by almost anything that I do, including doing the dishes.
The right book does everything for me, and the wrong book does nothing.
I want to take a more simplistic approach to this question.
Games - unlike movies or reading - allow the user to provide input on a dynamic level. Movies provide a solid realisation of the story.
Reading allows the reader's mind to define the story.
The key thing that reading a story allows above the others, is imaginative freedom. A book cannot give you something to react to like a game can, nor can it show you so directly like videos can, but neither of those can allow you to imagine the scene or exercise your brain in such a way.
There is crossover between all forms of media. But reading is vastly different to games or movies or radio shows because it is conjured in the mind, suggested by what is written on the page.
The lines blur. You concept of story can cover a bard like oral tradition, a parent reading a story to a child, an audio book that is a simple recitation of the story, a radio adaptation of a book with multiple actors and sound effects etc. A musical ballard has a strong story component. A book may be purely words, or may include pictures and maps.
The main advantage of a written story, from the creators point of view, is that the creative component can be done alone (or at least with less input from others than most other media). Flipping that, a reader gets a more direct relationship with the creator.
An illustration or similar artwork might also have the direct relationship, but is more focussed on one time and place, and has to rely on the audience to fill in a cause or consequences.
Edit to add.
Extending my answer, the one thing a story can do that other media cannot is an autobiography.
There are things and ideas that are impossible to display but can be told.
The Library is a sphere whose exact center is any hexagon and whose circumference is unattainable. - Borges in The Library of Babel
One might notice an analogy to universe in the quote above. Much of modern physics and maths are such that we can convey them in story form and manipulate in our minds but can't display.
There are ideas too general or arbitrary (all polynomials of degree n) to show them (we could only show an instance) but can be discussed in all generality in a story form.
There are also things that we can't perceive with our visual perception (4 and higher dimensional shapes) even if we accurately show 2 or 3 dimensional projections. Once again, we use stories to talk about these things.
Disclaimer: of course, anything that can be written, can also be told in an audio narration or in film by narrator. I am answering the "stories" question from title not the "literature" from the body of question as these things are not specific to story being written instead of told.
I sat, immersed, on that balcony. Swamped by the stifling humidity of the mediterranean air, of a summer going stale, but drowning in the book in my hands.
I had taken the only door out of the apartment where we were arguing and tense save the front door; a miniature escape without leaving. And there I had opened the book to escape myself.
What I found, what I read, was no escape. On the pages was another like me, another hapless self-involved man, removed from me by 150 years and thousands of miles yet closer than I could bear.
Raskolnikov was me, and I was repulsed by both.
Literature is the purest form of narrative, and narrative is the nature of the self. No film ever met me at my self, nor murdered my indulgences with an axe.