The most functional answer will depend on establishing a balance between short-term and long-term needs. Your current income possibilities, and the cost of housing which might interest you must always be taken into consideration to develop functional strategies.
If you have adequate money for a down-payment and future mortgage payments to buy a house without stretching your finances past the point of comfort, then go for it.
So age and your current realities are undoubtedly critical elements to consider.
If, however, I was stuck in a dead-end job, with little possibility for increasing my income in the long-term, then enhancing my employability would become my priority.
For example, I earned my undergraduate degree before entering the workforce with a steady job but worked through Christmases and summers to make money for my next semesters.
Such assets allowed me to work in a job that I enjoyed while also financing my Master's degree, which facilitated earning enough money to buy my first house comfortably.
Fifteen years later, having moved to even more satisfying employment, I earned my Doctorate.
So it depends on where you are at your current stage of life, and what your long term plans might be.
Short-term pain can facilitate long terms gains if you pardon my sports cliche. Whatever you decide, resisting immediate gratification must always be something to consider.
I wish you well whatever you decide.