I run chess clubs in several schools and I often see children losing their Queens for either very little compensation or none at all. It’s not a problem that can be simply resolved by saying “move your Queen to the second rank” or “don’t move your Queen too early” or something similar. That might help her survive the opening phase of the game, but eventually she is going to have to get in amongst the fray.
What I try to do is make students more aware of the potential pitfalls of putting your Queen in amongst the opponent’s ranks, especially when she is on her own. While it might seem tempting to try to win a pawn with your Queen, such manoeuvres are inherently dangerous. It’s a bit like deciding your most powerful piece should take a stroll into the enemy camp to kill a foot soldier. Does the goal justify the risk?
The other thing worth saying is if you do find your Queen trapped there are often ways to release her by sacrificing minor material.
I’ve dug out two of my own games to illustrate the perils of Queen sorties. In the following game White gets his Queen trapped and misses an opportunity to free her by sacrificing a minor piece for two pawns.
In this game, Black takes a hot pawn but then realises that the Queen is trapped and takes steps to ensure she survives by sacrificing a minor piece. It didn’t change the outcome of the game, but it enabled Black to fight on for quite a long time.