To be totally technical - the Rosary had existed for a long time in various formats before anybody ever had a vision about it. I’m going to talk about this, because I’m kinda sad that we teach kids wrong, and that creates a window for them feeling lied to, later on.
Blessed Alanus de Rupe (aka Alan of the Rock, Alain de la Roche, etc.) was a famous Dominican preacher and visionary. Like many Dominicans, he promoted the faithful’s use of the Dominican Rosary format, which already existed for a little while but was much younger than St. Dominic. Bl. Alanus had many visions and mystical dreams, which he described during his preaching, among which were visions of Mary giving the Rosary to St. Dominic.
This doesn’t mean that Mary was telling us that St. Dominic historically received the Rosary from her, or that God is telling us that about Mary. The context of the vision was pretty clearly that the Dominican order had been given the Rosary in general and was supposed to spread it, and that Bl. Alanus (a Dominican) was specifically supposed to start using it, but not that the vision covered any single historical event with Dominic as a specific person. (Unless it was supposed to be an event which took place in Heaven between Mary and Dominic, after his death. Which is possible.)
St. Dominic’s prayer life is pretty fully documented, for a medieval guy. We know his various prayer postures. We know about his devotion to Mary. His Dominicans were always trying to imitate his doings. So the idea that St. Dominic was historically saying the Dominican Rosary, including the Hail Mary that was invented later, but that it was then forgotten for a couple hundred years until it was re-invented, is kinda historically implausible. If Mary had historically told St. Dominic during his lifetime to spread the Dominican Rosary, half of Europe would have been Dominican Rosaried out the gahooey. But we don’t have any evidence for that.
On the other hand, a vision to convince Bl. Alanus de Rupe that the Rosary was a totally good idea for Dominicans is a lot more likely and useful. (We know he was originally not too interested in the Rosary.) In fact, medieval academics expected to have symbolic visions if they had any, so I’m sure it made him very happy!
Re: the late invention of the Hail Mary:
St. Albert the Great was a Dominican who joined up not long after St. Dominic was already dead, and he stayed in the order during a fairly long life.
St. Albert’s Marian prayer was to say the Angelic Salutation, which consisted of only Gabriel’s Scriptural greeting to Mary. He would say this something like fifty times a day, (in Latin) “Hail Mary, full of grace, the Lord is with thee, blessed art thou among women”, and then going down on his knees to say, “and blessed is the fruit of thy womb, Jesus.”
And he’d meditate a little, and then he’d get up and say it again.
If they’d had the Hail Mary or the Dominican Rosary, he would have said them. But they didn’t have either of those things yet.
So anyway… one of the things about private revelations is that even true and approved revelations can be misinterpreted or garbled by people, even though they fully intend to pass along the visionary’s account faithfully. Since people can take the Bible wrong even though it has Divine inspiration, this isn’t surprising.
Church-approved private revelations are supposed to be helpful. But when they’re not (for whatever reason) it’s good to know that they’re not essential. They are “worthy of belief,” but you don’t have to believe them or treat them like the Bible.