Did your vet give bordetella / kennel cough vaccine at that first visit...? If yes, then your puppy contracted kennel cough from it. I would not get this vaccine again, btw - it's not needed - it's NOT a
core vaccine.
The thing you need to worry about right now is preventing the kennel cough from progressing to pneumonia - which can happen easily and quickly in puppies, and can be deadly. If the cough is not improving, you DO need to go back to the vet and this pup should be on meds, including a cough suppressant.
And btw, this cough could easily take 3-8 weeks to be gone...