When a young child is sick or in pain, and they say something like, "I prayed to HaShem to make it better but he didn't do anything" what's a good way to answer that kind of question?
How you phrase things will depend on the age of the child, but here are some points you can cover. I'm not a parent, but I've seen parents and teachers offer all of these and remember being told some of them when I was a child.
Just because you didn't see something happen doesn't mean Hashem didn't do anything. Most of what Hashem does we don't see directly. (Depending on the situation: maybe you're healing faster than you would have because of your prayers.)
When praying it's best if you say how you feel but don't ask for specific outcomes. Hashem isn't a giant order-fulfillment service.
"He didn't do anything... yet." Be patient. (This doesn't apply to all situations.)
Hashem hears all prayers. Sometimes the answer is "no". It's hard to understand why, but he has his reasons. (I would use this one only for an older child; I don't think a 5-year-old is likely to understand this, but a 10-year-old could.)