[Attention! This question requires some reading and it's answer probably is in form of a "soft-answer", i.e. it can't be translated into a hard mathematical proposition. (I hope I haven't scared away all readers with this.)]
Consider the following three examples:
1) [If this example seems too technical just skip it - it isn't that important for the idea I want to convey.] The set $T$ of all terms (of a functional structure) is the set $T=\bigcap_{O\text{ closed under concatenation with function symbols}}_{O\supseteq X} O,$where $X$ is the (countable) of all variables and "closed under concatenation with function symbol" means: If $f$ is some function symbol of arity $n$ and $x_1,\ldots,x_n\in X$, then $fx_1\ldots x_n\in T$. The above $T$ is the smallest set such that it contains the variables and is closed under concatenation with function symbols.
2) The smallest subgroup $G$ of a group $X$, containing a set $A\subseteq X$, is the set $G:=\bigcap_{O\ \text{ is a subgroup of $X$}}_{O\supseteq A} O.$
3) The smallest $\sigma$-algebra $\mathcal{A}$ on a set $X$ containing a set $A\subseteq X$ is the set $\mathcal{A}:=\bigcap_{O\ \text{ is a $\sigma$-algebra on $X$}}_{O\supseteq A} O.$
4) The set $C:=\bigcap_{O\ \text{ is open in $X$}}_{O\supseteq A} O,$ where $X$ is a metric space and $A\subseteq X$ is arbitrary.
Now here's the thing: The sets $T$, $G$, and $\mathcal{A}$, from examples 1),2) and 3) are also closed under the closing condition defining them, i.e. $T$ is also closed under concatenation with function symbols, $G$ is also a group and $\mathcal{A}$ is also a $\sigma$-algebra; for $G$ and $\mathcal{A}$ this is already implied by their name (the smallest subgroup, the smallest $\sigma$*-algebra*), which was the reason I also gave $T$ as an example, where it's name doesn't already imply it's closure under it's defining closure operations. But the set $C$ from example 4) need not be open, if for example $\mathbb{R}=X$ and $A=[0,1]$ (maybe there are nontrivial metric space, where it is open for nontrivial sets $A$, but I didn't want to waste time checking that). That is, $C$ isn't closed (no pun intended) under the closing condition I used to define it; or differently said: There isn't a smallest open set containing $A$.
Notice that the closure conditions in 1) and 2) have a more algebraic character, since we close under some algebraic operations, where the closure condition in 3) as a more "set-theoretical-topology"-type character, since we close under set-theoretic operations. Nonetheless in all cases the outcome is again "closed".
My question is: How do generally (abstractly) "closing conditions" $\mathscr{C}$ have to look like such that the set $ S:=\bigcap_{O\ \text{ is closed under $\mathscr{C}$}}_{O\supseteq A} O$ is itself closed in $X$ under $\mathscr{C}$, where $A\subseteq X$ is an arbitrary set ? Differently said: How do generally (abstractly) "closing conditions" have to look like such that there is a smallest set being closed under these conditions, containing some arbitrary fixed set.