When my daughter was little and got gum in her hair, I had to cut it out that was all we knew.
Then, I heard a tip that saved the day!
Peanut butter removes all traces of gum from hair.
Ice cubes also help in other situations to harden the gum and remove it, then if possible peanut butter. Watch for the oil in peanut butter on surfaces.