The axiom is
$$\forall x \ \exists y \ \forall z \ (\varphi(z,x) \to z\in y) \to \forall X \ \exists Y \ \forall y \ (y \in Y \leftrightarrow \exists x\in X \ \varphi(y,x)) $$
Consider
$$\forall x \ \exists y \ \forall z \ (z\in x \to z\in y) \to \forall X \ \exists Y \ \forall y \ (y \in Y \leftrightarrow \exists x\in X \ y\in x ) $$
This is an instance of the axiom. Now the left side is true (take $y=x$). The right side expresses the existence of the union of $X$.
For another
The other version likeof the axiom:
$$\forall x\in X \ \exists y \ \varphi(x,y) \to \ \exists Y \ \forall x\in X \ \exists y\in Y \ \varphi(x,y)$$
you can use something like
$$\forall x \in P(X) \exists y \ (|x|=1 \to x=\{y\}) \to \exists Y \ \forall x\in P(X) \ \exists y\in Y \ (|x|=1 \to x=\{y\})$$

