The amount of yeast that you inoculate in your wort is refereed to as the "pitch rate", meaning the number of yeast cells / mL / °P in your wort. To calculate the amount of yeast you need in your wort, you can use an online calculator like the one of brewer's friend ( https://www.brewersfriend.com/yeast-pitch-rate-and-starter-calculator/ )
That being said, for 1 gallon of beer you can usually get away with half a package of dry yeast (11g/2 = 5.5g ~ 5g), that's a pitch rate of 1cells / mL / °P, which is usually what you should aim for.
If you are using the yeast from a ziplock of your local brewery, it is going to be hard to say, since you don't have the cell density of the slurry in the ziplock.
Best thing would be to ask your local brewer how much he puts in his wort or how much he would put considering your situation.
First comment, would be to always re-hydrate your yeast in sterile water before pitching. Pitching dry yeast in wort results in most of the cells dying immediately. Second, do not aerate your wort(= shake) when it is already multiple weeks in fermentation, that can lead to various off flavors from oxydation
Different yeast have different floculation properties, it is hard to say like this, maybe your did not put enough, or your other yeast is not active enough either.
To ensure not ruining more batches, make sure to always use good yeast before pitching, you can test your yeast by putting some of it in a container with some left over wort or sugary water, before your actual brewing day.
The simplest way to maximize your chances is to get fresh dry brewer's yeast and use the same calculator from above, to pitch the good amount, roughly.