Spoilers ahead for The Haunting of Bly Manor. In The Haunting of Bly Manor, dolls and ghosts go hand in hand, but not in the way you might expect. While they add to the spooky atmosphere, the Bly Manor dolls also serve an important purpose: alerting Miles and Flora where the ghosts are in the house, and especially the vengeful Lady of the Lake.
Though Dani has a few run-ins with creepy dolls in the attic and basement, they don't do much besides provide a quick jump scare. The important dolls are the ones who Flora creates and keeps in her dollhouse. As Flora explains to Rebecca in a flashback, her dolls are "not made up" but all based on real people. This includes both those living in Bly and the dead souls the Lady of the Lake has trapped there. And as it becomes increasingly clear, the dolls also show each person (and ghost's) location.
This is alluded to early on. When Flora first meets Dani, she leaves Rebecca's brown doll at the lake, where she died and assumedly where her ghost was sitting with Flora just moments before. Later, Dani offers to play hide-and-seek with Flora and Miles before bedtime. Flora is initially hesitant, saying they can't be outside of their rooms too late. But after noticing the Lady of the Lake's doll under her dresser — aka under the lake — she becomes assured that it's OK.
In Episode 4, Dani inspects the doll house, and we see where the rest of the ghosts are. The plague doctor always seems to linger in the hallways, while Rebecca is often by Flora's bed — seemingly represented by a new doll with a black dress, just like the one she died in. When Dani picks up the Peter doll, Flora politely asks, "Please don't move things around in my doll house. I have a very particular system." Flora is later startled awake when she sees that Dani's doll bed is empty and the Lady of the Lake doll is in the doll house. This ends up being true to life; Dani is in the midst of grabbing alcohol from downstairs when Flora and Miles arrive to distract her so that the Lady of the Lake can pass by undisturbed.
In Episode 6, we even see who's moving the dolls for Flora. After tucking Flora in, Dani spots the kid ghost playing with the dollhouse. We later see him literally turning the Flora doll on her side just as the real Flora turns in bed, cementing the fact that he's been watching over them all along. Since most of the other ghosts also died as a result of the Lady of the Lake, it's possible that they occasionally move the dolls as well. At the very least, we know Rebecca is often with Flora, and her vested interest in protecting the children likely means she keeps an eye on the Lady of the Lake too.
In this way, The Haunting of Bly Manor subverts expectations around what at first appears to be an overused horror trope. Unlike The Conjuring's Annabelle, Child's Play's Chucky, or Goosebump's Slappy, Flora's dolls aren't possessed or cursed. They're literally just dolls. But on a deeper level, they're a source of comfort used as a way to ward off — not invite in — evil. They also act as a fitting reminder that half of the dolls represent people who have long been forgotten; in a small way, Flora is helping to acknowledge they still exist. It's a surprisingly bittersweet detail, but one that fits perfectly in a story that's ultimately about heartbreak, loss, and letting go.