If the math works that you can buy now for roughly equivalent to rent, or within a delta that makes sense, then I would consider buying now.
But if buying is significantly more expensive than your current rent, you probably want to build up a cushion while you are able.
Either way, do the math on whatever you buy as if you were going to rent it out in a year or two. If it makes sense from that perspective, then I wouldn’t wait two years.