Is the domain of an one-to-one function a set if the target is a set? This is probably very naive but suppose I have an injective map from a class into a set, may I conclude that the domain of the map is a set as well?

If a function $f:A\to B$ is injective one, we can assume without loss of generality that $f$ is surjective too (by passing to a subclass of $B$), therefore $f^{-1}:B\to A$ is also a bijection.
If $B$ is a set then every subclass of $B$ is a set, so $f^{-1}:B\to A$ is a bijection from a set, and by the axiom of replacement $A$ is a set.
