CRIB OR PLAYYARD

guys what’s better ? Initially I thought a crib would be better because majority of cribs are made to grow with the child. but idk (how long can a baby last if I bought a playyard)