
To wander is to roam without a fixed route or to stray. To wonder is to be curious about something or to marvel at it.
Use both verbs in the same scene
We wandered through the market and wondered who made the blue pottery. Wandered describes how we moved through the market. Wondered describes what we wanted to know.
You can also wonder at something that fills you with admiration or surprise. The visitors wondered at the detail in the tiny model.
Use the same distinction for thoughts
My mind wandered during the meeting means my attention drifted. I wondered when the meeting would end means I was curious about the time.
Wonder can also be a noun, as in The children watched in wonder. See Detract vs. Distract for another way to describe a shift in attention.