we have guns and ammo for that but if it’s just a small amount of us against a large group it will likely be game over.
But you see that is exactly the beauty of firearms.
They favor the defense to a much greater extent than melee weapons did in centuries past.
A person who attacks you has to actively leave their cover.
On the defense you can remain in cover while you shoot at attackers.
A tremendous advantage.
So just a couple of skilled folks armed with repeating firearms can beat of a larger force, or if its a much larger force impose unacceptable loses to them.
Any "gang" you might meet, that is large will automatically have moderately competent leadership ( otherwise they would not be a large gang but a broken up long ago) and moderately competent leadership will recognize the fact that you can inflict unacceptable losses on them in a defensive firefight and as a reslt either move on or plot to surprise you at night.
This is why number of "boots on the ground" is important, so you can man an OP 24 hours a day to avoid getting surprised.
It doesnt have to be a good fighter that is up awake at night
It can be an old person as long as they have their senses and wits about them to raise the alarm and fire the first shot.
In history a great many time times clans that would neglect night watches, would "wake up" with the men's throats slit and younger women captive.
Think European settlers on the American frontier, think the wild east of Siberia in 17th century, think the folks in eastern Europe prior to the advent of Nation states etc etc