Imagine you have a really important secret that you don't want anyone else to know. You might write it down on a piece of paper and hide it in a secret place, like under your bed or in a drawer. This is similar to what a chancery does in diplomacy.
A chancery is like the office or official headquarters of a country’s embassy in another country. It's the place where diplomats work and help their own country's citizens who may be living or traveling in that foreign country. They also help to maintain good relationships between the home country and the host country.
Inside a chancery, you might find lots of important documents, like treaties and agreements between countries. Diplomats might also use the chancery to have secret meetings or conversations with other diplomats to discuss important matters. Just like you keep your secrets hidden under your bed, diplomats use the chancery to keep secrets safe and secure.
So, in summary, a chancery is like the secret office where diplomats work to help their own citizens and keep important information and secrets safe from other countries.