While Stephen King's "The Shining" is one of the greatest horror novels, Stanley Kubrick made several changes to the original material. Yet, the movie is considered one of the greatest horror movies of all time. The Grady sisters are portrayed by identical twins Lisa and Louise Burns.
Kubrick puts far more emphasis on the Grady sisters than King's novel. The girls, in the novel, are mentioned a few times but are never prominent - they are not named, but they are described as "cute as buttons." In the novel, the girls are sisters, not twins. The Grady girls are 8 and 10 years old in the novel. Kubrick cleverly changed the Grady sisters to identical twins, Alexa and Alexie. The sight of them speaking to Danny in unison and a monotone is one of the movie's creepiest images.
It was certainly a sharp move on Kubrick's part to change the girls to twins. Kubrick's change is likely because of a desire to add to the motif of doubles, which runs through the movie. The novel is full of characters who are paired with unsettling reflections of themselves.
The Grady sisters don't act like the other hotel ghosts present, who collectively, drive Jack Torrance into insanity replete with murderous intent. The twins, despite their sinister appearance (they are ghosts after all), try to help Danny by warning him. We find out they were killed after trying to burn down the Hotel because they knew it was full of dark power - they tried to end it once and for all.
https://screenrant.com/the-shining-twins-explained-grady-sisters-changes-movie.
https://stephenking.fandom.com/wiki/Grady_sisters