I’ve been reading Dasgupta’s Set Theory book about how the aleph numbers are constructed. He defines them as follows: 
He uses transfinite recursion:
However, I don’t think in that form, transfinite recursion works because there is no set which has all the ordinal as numbers. I know that some books such as Devlin’s The Joy of Sets have a version of transfinite recursion using classes which then works but I want to avoid using classes and only use sets. How does one properly define the alephs using transfinite recursion for sets?

You can define $\omega_\alpha$ for any given $\alpha$ just using the theorem you cited here. Just apply it to $A=\alpha+1$ and then we have $\omega_\alpha=F(\alpha).$
If you want to define $(\omega_\alpha)_{\alpha\in Ord}$ as a ordinal sequence on all ordinals, you need to realize that this is a class function, whereas recursion theorem you cite yields a set function $F:A\to V.$ You can't 'avoid classes and only use sets' here. It's true that you never need classes in a certain sense, but you don't replace them by sets, you replace them by metatheoretical reasoning about formulas. You want to prove the existence of a formula (that corresponds to the class function $\omega_\alpha:Ord\to V$ that you want). If you insist on doing it without using any kind of class notation, you will just wind up proving an instance of the class version of transfinite recursion, only everything will be more verbose and difficult to parse. (And it's a good exercise for understanding how classes 'actually work'. You mention Devlin's book here and if I recall right, he has a pretty good discussion on this.)