The practice and role of myths changes from religion to a story told to children to send them to sleep. When people first created myths they were thought of as fact. Over time it evolved into stories of entertainment. Stories like Percy Jackson and the Olympians or the Kane Chronicles.
When people hear the word myth most people think of Zeus and Hera. Those stories are myths but so are those of witches and wizards, or Ra and Anubis. The ancient Greeks, Romans and Egyptians are just some of the people who used myths to explain how people came to be, storms, disease, and war. These became a religion and people worshiped their pantheon of Gods and Goddesses. The same also applies to witches and wizards, if something happened that couldn’t be explained they got blamed. The difference is instead of being worshiped they were hunted and killed.
What changed was science. When scientific explanations were introduced people generally accepted them. This acceptance stopped the worship of the pantheons and the hunting of witches and wizards. They became stories and legends, told to entertain of to study ancient belief systems.
The practice and role of Myths changed from religion to stories. Not many people today still believe in the old myths and legends they are mostly used to entertain. In stories like Harry Potter or Percy Jackson.