Dogs and puppies can have peanut butter as long as it is fed in moderation and does not contain xylitol which is deadly and toxic to dogs and puppies.
Some people say that you can give a 2 month old puppy some peanut butter which is likely okay but only give them a little bit and not too much so they won't choke.
I would personally wait until the puppy is around 4 to 6 weeks of age before giving them peanut butter just avoid the possible choking hazard because peanut butter can easily stick to the roof of the puppies mouth making it hard for them to open and close their mouth and may cause the puppy to choke.
But in moderation peanut butter is very healthy for your puppy and dog but just wait until they're at least 3 months old but some people have safely fed a little bit of peanut butter to their puppies at 2 months of age.