How to apply axiom of choice on the universe of sets? If we have $\forall x(x\in X\to\exists y(y\in Y\land\varphi(x,y)))$,
then we can define a function $f$ from $X$ to $\mathcal P(Y)\setminus\{\emptyset\}$
such that $f(x)=\{y\in Y|\varphi(x,y)\}$,
and use axiom of choice to define a choice function $g$ from $\mathcal P(Y)\setminus\{\emptyset\}$ to $Y$ so that the composition $g\circ f$ is a function mapping
each $x\in X$ to some $y\in Y$ that satisfies $\varphi(x,y)$.
But if we instead have $\forall x(x\in X\to\exists y(\varphi(x,y)))$,
is it still possible to construct a function from each $x\in X$ to some $y$ that satisfies $\varphi(x,y)$, with codomain given by axiom schema of replacement?
Is it possible to "make a choice" from the universe of sets instead of from some set $Y$?
 A: If you assume the axiom of foundation, then yes, this is possible. If you do not assume the axiom of foundation, it may be impossible.
The relevant axiom scheme is the axiom scheme of (strong) collection. This scheme can be phrased as follows:

Suppose $\forall x \in X \exists y (\phi(x, y))$. Then there is some indexed family of inhabited sets $\{Y_x\}_{x \in X}$ such that $\forall x \in X \forall y \in Y_x (\phi(x, y))$.

Over the axiom of choice, the collection scheme is equivalent to your proposed choice scheme.
For suppose the collection scheme, and pick some $\{Y_x\}_{x \in X}$ as described. Then the axiom of choice tells us $\prod\limits_{x \in X} Y_x$ has an element $f$, and we see that $\forall x \in X (\phi(x, f(x)))$.
Conversely, suppose there is some function $f$ with domain $X$ such that $\forall x \in X (\phi(x, f(x)))$. Then we can define $Y_x = \{f(x)\}$. As you’d expect, no choice is needed for this direction.
Let’s take a look at the axiom scheme of collection. It is well-known that this scheme follows from $ZF$ set theory using the so-called “Scott’s Trick”. This requires some knowledge of the “cumulative hierarchy” and the axiom of foundation, but if you’ve made a usual introductory study of $ZF$ set theory, it will be within your grasp.
However, it is also known that in $ZFC^{-}$ - that is, $ZFC$ without the axiom of foundation - the axiom scheme of collection can fail. For more details on this, see this question and answer. Be warned that this answer is highly technical and references another technical answer - you should be familiar with permutation models of ZF with atoms and how these can be translated into models with Quine atoms before proceeding.
Notwithstanding all of this, there is a broad class of instances of the axiom scheme of collection, known as “structural collection”, which always holds even in $ZFC^{-}$ due to the presence of the axiom of choice.
For some elaboration on this and a summary of this topic (and some alternatives to foundation), I would recommend my own answer to this question. My answer does use the language of classes, so be warned.
From your comments, you seem like you may be unfamiliar with how to translate statements about classes into statements about sets; I find the perspective in Kunen’s book Set Theory: An Introduction to Independence Proofs to be a useful one if you dislike the “ontology” of classes. He explains how to translate a statement involving classes into a metatheorem about set theory.
