Narrated 'Aisha: I asked the Prophet ﷺ about one's looking here and there during the prayer. He replied, "It is what Satan steals from the prayer of any one of you".
The Prophet Muhammad ﷺ also taught us that if we are distracted during prayer, then it is important to go back and start again so that the devil does not get a chance to take away any of our worship. We should strive to stay focused on God throughout the entire prayer so that all of our devotion goes towards Him alone.
It is also important for children to learn this lesson as well so they can understand why it is important to stay focused during their prayers and why they should avoid distractions at all costs. They should be taught how even small interruptions can lead them astray from their worship of God and how they must remain vigilant in order for their prayers to be accepted by Him.