Suppose we have a non-empty transitive class $\mathcal{C}$, meaning that if $x$ is in the class, then all its elements are also in the class. Suppose also that $\mathcal{C}$ satisfies the axiom schema of specification and the following property: If a set $x$ is such that all its elements are elements of $\mathcal{C}$, then there exists an element $y$ in the class $\mathcal{C}$ such that $x\subseteq y$.
I have to show that $\mathcal{C}$ satisfies all ZF axioms except for the axiom of infinity. Also, I have to find an example of such a class $\mathcal{C}$ such that the axiom of infinity is not satisfied.
I could prove that such a class $\mathcal{C}$ satisfies all ZF axioms except for the axiom of infinity. It is not very hard. For example, for the axiom of union, I just take the usual union and show that it is contained in $\mathcal{C}$, so I should have that this union is contained in some element of $\mathcal{C}$, and then by specification the union is an element of $\mathcal{C}$. The other axioms are similar to prove.
So, it only remains to find a class $\mathcal{C}$ which does not satisfy the axiom of infinity. We have the functional relation $V$ inductively defined as $V_{\alpha}=\bigcup_{\beta \in \alpha}\mathcal{P}\left (V_{\beta}\right )$ for every ordinal $\alpha$, where $V_{\emptyset}=\emptyset$. It is known that if $\alpha$ is a limit ordinal, then $V_{\alpha}$ satisfies all ZFC axioms except (perhaps) for the axiom of infinity, which is satisfied if and only if $\omega \in \alpha$. Therefore, I have the candidate $V_{\omega}$, which satisfies all ZF axioms except for the axiom of infinity, which is not satisfied because $\omega \not\in \omega$. Of course, $V_{\omega}$ is transitive, but I could not prove that it satisfies that if a set $x$ is such that all its elements are elements of $V_{\omega}$, then there exists an element $y\in V_{\omega}$ such that $x\subseteq y$ (indeed, I think that assertion is false).
Which $\mathcal{C}$ would you take?
EDIT: Some of you were asking where this question came from. I took it from "Teoría axiomática de conjuntos: Una introducción" by Roberto Cignoli. It is written in spanish. This is a screenshot of the exercise: