We made the mistake of getting a cheap pen with horizontal wiring ($35). Then we got this as recommended by Michelle Lennon ($99). He can't get out of it, though for several weeks he could squeeze through. At 13 weeks, he's too big for that now.
Regalo 192-Inch Super Wide Adjustable Baby Gate and Play Yard, 4-In-1, Bonus Kit, Includes 4 Pack of Wall Mounts
Regato 192" gate
I also recommend her "Dream Dog" course. I trained 9 years ago with a local pro, but this is more detailed and better organized. Takes a month for a person to get through the course, worth every penny. She also offers a lot of free content, and if you go to the "pro" level for another $75 per month, one can access three weekly zoom meetings with her and co. and get questions answered 24/7 via their facebook interface. For what one gets, it's a real bargain. I used it for a month and found it very helpful.
How to Train a Dream Dog
To be sure, I don't agree on every detail. For example, I do no-leash walks in woods; they don't recommend that. Also, her course is not really designed to train an active "outdoor" dog, but more for an "indoor" dog. She opposes electric fences and doggy doors. I've had great experiences for 9 years with both and will continue to use them (started electric fence training last week and making good progress). But otherwise, her course lays out solid foundation work. She trains you to be a puppy trainer and provides all the real-time help you could need.