There are several line of thoughts behind dogs/puppies "bad behaviour".
I have had dogs my whole life including rescues showing lots of unwanted behaviours.
My attitude towards dog has always been the same: they are pack animals and need some sort of leadership. Even if people and dog behaviourist have new thoughts on the matter.
A puppy is like a child in many ways. We put rules in place for children to grow up safely and in return, it's the child's normal behaviour to challenge these rules as they grow into adulthood.
For dogs/puppies, you have a similar problem. As they grow they try things and challenge what's around them.
Like a parent, you need to take charge. You need to make your puppy understand what's good behaviour and what's bad.
Your choices are:
1) Ignore a bad behaviour, show no interest or emotion once that behaviour occurs(for mild case)
2) recognise that the behaviour is bad enough that it needs a "negative" intervention. Basically disagree with the dog and use something simple like:"no!"
3) is the same as 2) but most effective of all: Start with 2) and then use what's called behaviour replacement therapy. Basically say "no", I disagree and then replace that behaviour by a command like"sit" followed by a reward.
You need to decide what's what and how you wish your dog to behave. Positive reinforcement is always best(the third option), however not always possible. This where training comes in. All of the basic commands(sit, stay, down...). This will give you and your dog structure and excellent communication. It's also very rewarding for both of you and will increase your bound. Be sensitive and start small, in a room your puppy is comfortable in with few distractions and build from there.
To train a dog, it's like 3). Patience is required. You never force a dog into a behaviour, you let him work it out. Wait for the behaviour and then reward it.
There are plenty of books available to help you.
Your puppy needs a leader. If he/she doesn't have one, he/she will be forced to lead and let's face it, being a leader can be stressful and difficult. If a puppy hasn't had another older dog show him what to do, he/she will make it up and it generally turns to aggression.
Dogs have always worked with humans. Historically, it's thought that wolves got closer to humans to get an easier meal. In exchange for food and security, they guarded, hunted, herded and so on. These days, they don't work and find it hard to have a purpose. You need to make your dog work for rewards.
Rewards is not just food but it is a big part of training(adjust your dogs diet to compensate for treats) but also hugs, cuddles, toys, whatever is going to enrich their life has to be earned and not given for free.
It would help if you told me what your dog is, especially if you need more help.
Good luck!