Just a couple of ideas to consider, child or even an adult:

1. Stay in a public place in sight of people. DO NOT go off with a stranger no matter how nice, interesting, helpful or whatever they say. Just say no. OK to talk to them, but don't go with them.

2. In an urban setting, go into a busy store and ask the employees for help. If they can't or will not help, ask a customer in sight and hearing of other customers. Observe rule 1; don't go off alone with a stranger.

3. It is OK to call the police/fire department/EMS, or to have someone call them for you. They need to understand that they will not be arrested or get into trouble. I don't think there is a LEO, firefighter, or EMT who would get angry at a lost child who needed their help to get home safely. It is OK to go with the police/firefighters/EMT IF they are in uniform and in a marked vehicle. This is the only exception to rule 1. No "undercover" police need apply.

Hope these ideas might be helpful. They are not original to me. Mom and Dad taught me them in the 1950s.
_________________________
"Better is the enemy of good enough."