By the time the story of Hansel and Gretel reached our ears it involved a witch, a candy house, and a happy ending. In the original there was murder, child abandonment, attempted cannibalism, and enslaved children. The time period of 1314 to 1322 was deemed The Great Famine in the Baltic regine, there was a famine that spread across Europe due to volcanic activity causing crop failure. It is estimated 30 million people died and 25% of the population was killed off globally. Older people chose to starve themselves to death, while some mothers abandoned or ate their children. People also often dug up graves and fed on the flesh of those who had passed. This is the reality of how the story of Hansel and Gretel was formed. The direct source for the story was Henriette Dorothea Wild who later gave the story to Wilhelm Grimm and later married him. Over the years the Grimm brothers adjusted it with other peoples versions from their families and how it was told to them and eventually it was watered down for a more kid friendly audience which is the story we all known today.
https://www.dw.com/en/10-best-grimm-fairy-tales/g-39216635
https://allthatsinteresting.com/hansel-and-gretel-true-story