I think the things usually billed as "play yards" are typically plastic, sometimes have more bells and whistles, and are often more costly than a simple ex-pen. A typical ex-pen is made of wire, coated either black or a gold-tone. (which tends not to hold up well)
My preference is for the standard ex-pen for a couple of reasons. First, industrious chewers can do a lot of damage to the plastic ones. Second, the metal type are SO flexible. You can fold them smaller for closer confinement for litter box training, or attach several together to make a space that is actually big enough to romp around in a bit. They can be strung across doorways or used to guard book cases or valuable rugs. We moved our 3 around CONSTANTLY when Kodi was a puppy.
...and when we are on RV vacations with our extended family, we make a BIG pen by attaching several together, and all the family dogs can run around and play together. (otherwise, in most camp grounds they have to be on leash all the time)
They continue to be useful later too. We have used them extensively over the last few months while our house has been renovated to keep Kodi out of wet paint, wet grout, the carpenter's pencils...
I also put the 3 together under a tree as a "holding pen" when friends come over to play on my agility course. The dogs who aren't running wait in the ex-pen enclosure so that the one on course can run without interference.