As you have discovered there are various reason a dog barks:-
Watchdog barking - whats that? I need to deal with it, get it to go away of chase it away.
Request barking - I neeeeeeed something now
Spooky barking - not sure what that is I feel unsure I know I will bark it away
Boredom Barking - what can I do next? I know bark
Enjoyment Barking - I bark because it makes me feel good
Some dogs bark for all of the above others for just some of the above.
It is worth looking at the overall day of your dog and see if they think tey are getting enough stimulation or rest.
If it is watchdog barking look at ways of blocking off the area that causes the barking eg have curtains drawn in the room that looks out on the neighbours.
Request barking -never ever give the dog anything if it is barking. Stand still see if they sit and then reward with loads of attention and a game. - Barking walk away - Expect the barking to get worse before it gets better if it is request barking and if you ONCE give into the barking this will take way longer to sort out. However also see if you can prevent this barking in the first place Make sure the dog does get enough stimulation through the day, encourage chew toys, and food toys eg kongs.
Spooky barking is really the same as watchdog barking try to prevent the situation that causes the spooky barking
Boredom barking needs similar treatment to request barking but do look at the stimulation and sleep the puppy is getting.
I personally never teach a quiet command as if you are not with the dog that will obvioulsy not work. A dog that likes barking will get much more reinforcement from the barking than from the reward you give for being quiet so you are on a road to nowhere with this really.
If you are not sure why your dog is barking another alternative is to scatter feed everytime they bark - this is not rewarding the bark but the dog will associate the food with whatever is making them bark (you may never find out what it is) so when they hear, see or smell whatever makes them bark they will turn to you for a treat
Good luck this is an annoying one to sort out as you are constantly worried about neighbours etc be consistent and it can be sorted