We went to rescue one puppy, but we got attacked

When you go to rescue a puppy and get attacked, it can happen for several reasons.
1. The mother dog protecting her puppy
If the mother dog is nearby, she can become very aggressive to protect her babies.
2. The dog is afraid of people
Stray dogs or dogs that were previously abused may see humans as a threat and attack.
3. The dog is in pain or injured
If a dog is hurt, it may bite anyone who comes close.
4. Protecting territory
The dog might think you are entering its territory.
Safer ways to rescue a puppy:
Look around first to see if the mother dog is nearby.
Do not approach too quickly.
You can use food to lure the dog away.
Go with several people but keep a safe distance.
If the dog is very aggressive, call an animal rescue team.
If someone gets bitten:
Wash the wound immediately with soap and running water for at least 10–15 minutes.
Disinfect the wound.
Go to a doctor to check the injury and get a rabies vaccine if necessary.