I would build up more cash reserves and work on credit scores first. (Of course, that’s NOT what I did when I was in your shoes, but my timing was lucky)
If you decide to buy, though, consider the potential cash flow if you were to turn it into a rental. That way your future plans to move up or move on will have more flexibility.