One thing that is especially great about having a puppy is how cute they can be - and in fact, puppies can sometimes be so cute that it becomes easy for you to let it slide when they are doing things that they should not really be doing - but one of the problems with having a cute puppy that gets away with doing things it should not be doing is that it will eventually become an adult dog, and these bad habits will carry over; one of the worst "bad habits" a puppy can get into - and that can become permanent behavior if you are not careful - is whining, which can become especially annoying what it continues to happen all the time, even as your puppy grows into an adult.
You should be aware of the fact that your puppy is likely trying to communicate something to you when it is whining - but while this message it is trying to tell you will sometimes be important (for instance, "I need to go to the bathroom," or "I don't feel very good"), there will be lots of other times when your puppy is whining because they simply want attention; learn to discern why your puppy is whining, and if they are whining because they simply want attention, you will need to learn to not reward them for this behavior! Your puppy will usually stop whining for attention once you stop giving them attention as a reward for whining, but if you are unable to solve the problem this way, another thing you can do is find something your puppy dislikes - such as being sprayed with water from a spray bottle, or having a noise-maker shaken around them - and when they start to whine for attention, counteract their whining with this thing they do not like. They will no longer equate "whining" with "a means to getting attention" when you consistently respond to their whining with this spray bottle, or with this noise-maker, but will instead begin to equate whining with whatever negative reaction you have chosen. And of course, you will not just want to repay bad behavior with a negative response, but will also want to repay good behavior with a positive response; when your puppy does good things, make sure you are rewarding them - and in this way, you will constantly reinforce positive behavior, while getting rid of the negative!