In many cases, the number 1 tip dog trainers should give puppy owners when they tell about difficulties they have with their pup is: 'You should exercise your dog more'. When dogs have too much energy and you are not providing them with a way to get rid of this energy, they will find a way to do so themselves. That's also why puppies tend to get these huge energy spikes often called the 'zoomies' in evenings.
How long should you exercise your puppy?
The advice often given when walking a puppy comes down to walks up to 5 minutes for every month of age or 1 minute for every week old they are (which comes down to pretty much the same). You can ofcourse walk your puppy multiple times a day. For play time or exercises, use about the same metrics. Play with your puppy for a few minutes and them give them some time off to process or sleep. Using lots of short play times spread out over the day will provide you and your puppy with more benefits than 1 play session an hour long in the evening. Their muscles and joints are still developing and long sessions aren't beneficial for their development.
How to exercise your puppy?
There are lots of ways to exercise your puppy. Since they are still very young, keep these moments short so you don't put too much stress on their growing ligaments and growth plates. You should also use these moments as training sessions. Keep in mind that every interaction with your puppy is a moment for them to learn something. It's up to you to keep in check what you teach them.
You can, for example, start with teaching your puppy how to play fetch. Starting out with a game of tug of war to show them it's fun to bring their toys back to you. Over time, you can throw the toy further and further as you know they'll bring it back to you.
Even a walk can be enough to drain some puppy's energy. Going on a walk not only stimulates them physically, but also mentally, since they experience new things every time.
Challenge them mentally
As stated above, walks can be a nice mix to stimulate your dog on a physical and mental level. They have smells to experience, new things to see,... Their mind will need some time to process new experiences, that's why some dogs that didn't go outdoors a lot early on in their lives can be really tired after even after a short walk.
Another way to get rid of the energy of your puppy that can be very fun is mental exercises. Teaching your dog new stuff like trick training can be very tiring mentally for a dog. Compare it to studying for an exam. Even though you're not always getting lots of physical exercise on days you are studying, you're often fatigued at the end of the day. The same goes for your dog. Stimulating them mentally will also fatigue them.
You can include some basic obedience training. Teaching your pup the basic commands like sit, down, stand, stay,... and rewarding them with some running and play time can also provide them with enough stimulation to drain their energy.
Since you know your puppy better than anyone else, you should be able to determine whether they need more exercise or are overly tired. Providing your pup with enough time to rest in between play time is very important since not all puppies are good at deciding for themselves when they need some sleep.