Imagine you have a toy that you really love and want to protect. So, you create a special space or spot for that toy where nobody can touch it. This space is like a sanctuary for your toy.
Similarly, a sanctuary city is a place where some people go to live and work who might be afraid of being punished or persecuted for things like where they came from, how they got here, or what they believe or look like. These people might want to live like everyone else or be safe from harm. So, the government of that city agrees not to share information about anyone living there with another government like the police or immigration authorities, making it safe for these people to live without fear of being punished or persecuted.