There are several subtle issues with your post.
It is not in general possible to express the notion of "definable", because it leads to contradictions. For example, the class $D$ is not definable in the language of set theory (or whatever language you are using), since if it were, then the least ordinal not in $D$ would be definable, but not in $D$, which is a contradiction.
Meanwhile, there is the phenomenon in set theory of pointwise definable models, which are models of ZFC in which every set is definable without parameters. For example, we discuss this issue at length in my paper:
In a pointwise definable model, there is no least ordinal that is not definable, and there is no ordinal larger than every definable ordinal. In the article, we point out the following, regarding the extent to which definability is first-order expressible:
Let us now turn to the question of the extent to which
definability is first-order expressible, by presenting a
number of examples that illustrate the range of
possibility. We have already observed that the property of
a model being pointwise definable is not first order
expressible, since it is not preserved by nontrivial
elementary extensions. Since pointwise definability is a
strong generalization of the axiom V=HOD, it is tempting
to introduce such notation as V=D or V=HD to express
that a model is pointwise definable, thereby maintaining a
parallel to the classical V=HOD notation while
emphasizing that the definitions need no parameters. We
hesitate to adopt this notation, however, because we fear
it would incorrectly suggest that the concept is
first-order expressible, which isn't the case.
(i) There is no uniform definition of the class of
definable elements. Specifically, there is no formula
$\mathop{\rm df}(x)$ in the language of set theory that is
satisfied in any model $M\models\text{ZFC}$ exactly by the
definable elements. The reason is that if $M_0$ is
pointwise definable and $M_0\prec M$ is a nontrivial
elementary extension, then the definable elements of $M_0$
and $M$ are precisely the elements of $M_0$, and so $M_0$
should satisfy $\forall x\,\mathop{\rm df}(x)$ but $M$
would satisfy $\exists x\,\neg \mathop{\rm df}(x)$,
contrary to $M_0\prec M$.
(ii) The class of definable elements can form a
definable class. Although there is no uniform definition
of the class of definable elements, it can sometimes happen
that a model enjoys a certain structure that allows it to
see its collection of definable elements as a definable
class. For example, in a pointwise definable model, the
class of definable elements includes every object and is
therefore defined by the formula $x=x$. See also (iv) and
(v) below.
(iii) The collection of definable elements might
not form a class. Consider any model
$M\models\text{ZFC}$, and let $N$ be an ultrapower of
$M$ by an ultrafilter on the natural numbers. The
parameter-free definable elements of $N$ are
necessarily contained in the range of the
ultrapower map, and in particular, do not include
any of the newly added nonstandard natural
numbers. Thus, the class of definable elements of
$N$ is not amenable to $N$, for it would reveal
that its natural number are not well-founded.
(iv) The definable elements can form a definable
class in a model having no class function $r\mapsto\psi_r$
mapping definable elements to definitions. Suppose
that $M$ is a pointwise definable model of \ZFC.
The definable elements of $M$ are all of $M$,
which is certainly a definable class in $M$. But
$M$ cannot have a function $r\mapsto\psi_r$
associating to each element $r$ of $M$, or even to
each real of $M$, a defining formula $\psi_r$,
since such a map would reveal to $M$ that it has
only countably many reals.
(v) The definable elements can be a set in a model
that does have a definability map $r\mapsto\psi_r$.
Suppose that $\kappa$ is an inaccessible cardinal (this
hypothesis can be reduced), and observe by a
Lowenheim-Skolem argument that there are numerous
$\gamma<\kappa$ with $V_\gamma\prec
V_\kappa\models\text{ZFC}$. It follows that the definable
elements of $V_\kappa$ are all in $V_\gamma$ and satisfy
the same definitions there as in $V_\kappa$. Since
$V_\gamma$ is a set in $V_\kappa$, we may construct in
$V_\kappa$ the function $r\mapsto \psi_r$ that maps
every definable element $r$ of $V_\gamma$ to the
smallest definition $\psi_r$ of it, and because
$V_\gamma\prec V_\kappa$, this function has the same
property with respect to $V_\kappa$, as desired. The large
cardinal hypothesis can be reduced; it is sufficient to
have an $\omega$-model $M$ with some $M_0\in M$ having
$M_0\prec M$.
(vi) No model can have a definable definability
map $r\mapsto\psi_r$. If such a map were definable, then
since there are only countably many definitions $\psi_r$,
we could easily diagonalize against it to produce a
definable real not in the domain of the map. In (v), the
map is definable from parameter $\gamma$.
Meanwhile, the universal definition shows that there is a single definition that can in principle define any desired object. For example, any set at all, including any ordinal, can be made definable in a forcing extension of the universe.