The Rambam writes (Deos 5:10) from Sifri:
English translation (from Chabad.org, here):
The way of sensible men is that first, one should establish an occupation by which he can support himself. Then, he should purchase a house to live in and then, marry a wife. [This order of priorities may be inferred from Deuteronomy 20:5-7], which states: “Who is the man who has planted a vineyard, but not redeemed it…;” “who is the man who has built a house, but not dedicated it…;” “who is the man who has betrothed a woman, but not taken her [to wife]…”
In contrast, a fool begins by marrying a wife. Then, if he can find the means, he purchases a house. Finally, towards the end of his life, he will search about for a trade or support himself from charity.
[This is also implied by the order of] the curses mentioned [in Deuteronomy 28:30]: “You shall betroth a woman…, you shall build a house…, you shall plant a vineyard;” i.e., your behavior will be disordered so that you will not succeed in your ways. However, in regard to blessing [I Samuel 18:14] states: “And David was thoughtful in all his undertakings and God was with him.”
Can’t say it better myself.