The Shining has so many reasons why it "has stakes". While Duvall was definitely an amazing part of that, it seems unfair to deprecate the rest of the creative folks involved in the film.
I never read the book, but I saw the TV mini-series remake that King was personally involved with and approved, and it was awful.
Personally, I think King's stories just don't translate very well to movies, unless (as with Kubrick's "The Shining") huge liberties are taken with the source material. Most adaptations I've seen of his stories were just bad.
When I heard they were making a movie of Doctor Sleep, knowing that the final 20% of the book is absolutely untranslatable to coherent movie content, I could not understand how they could close it. In the end, they more or less worked around the finale, which is basically a series of psychic battles fought remotely. It's a tolerable movie.
One example of a truly unfilmable King/Bachman novel is Thinner, though maybe it could now be done, at great expense, with AI (there was a ridiculous TV version, though).
I interviewed him, when I was aged 16, in 1983, and asked him about The Shining. He was in a conciliatory mood on the topic that day, but re-emphasized how little he thought of Kubrick's shot choices for the scene where Danny discovers Wendy reading his manuscript.
To that criticism, Kubrick responded over the years that if we had just been jump-scared by Jack suddenly appearing over Wendy's shoulder as she read, we would have felt relief and even started laughing to blow it off, which would have undermined the tension Kubrick was looking to build past this point in the scene.