Depends on your budget. A 5 year old cow that has produced three high quality (i.e., high selling/high value) calves from different bulls makes a pretty safe purchase. But - these come at a significant cost. Of course, a thorough knowledge base of the cow in question is also important - more money does not automatically equate to more quality. But, the authentic proven ones will cost you plenty.
Good heifers from known quality cows are also expensive, but in my opinion for the money you might get lucky and get a great cow at a bargain price. The one thing I think you do not do is buy older cows that have produced average calves and expect something different in the future. The better gamble is on the heifer.