Hi Pebble,
I'm very sorry to hear about your losses.
I'm not sure it'd be anything you're really doing wrong unfortunately, it could be just a run of bad luck or it could be underlying illnesses coming to the fore. Unfortunately birds being prey animals tend to hide their illness in the early stages, a preservation reflex as birds which are obviously ill are victim both of predators and of other birds. So they will generally only show it in the later stages when the problem is rather critical or the bird is moribund and near death. If you definitely see them unwell, in my experience unless you're an old hand and know how to definitively diagnose the exact issue and treat as a vet and have those supplies on hand, it's time to make a swift trip to the avian specialist vet.
Hard poo pasted to the vent could indicate a few things and would ime be more of a symptom of a wider problem than the whole problem itself. It is usually resulting from diarrhea or high excretion of urates but that could be caused by any number of things from stress, change in feeding routines, a bacterial infection, liver or kidney being compromised, some parasites, spoiled foodstuffs etc. It's really hard to say and some of those causes could be quite serious even with vet intervention, while others quite mild and self resolving with minimal home support. Dehydration might have played a factor if the paste was due to Garlic having diarrhea. Giving extra water, electrolyte solutions or sugarless juices/cordials as some people do can be a stop gap but if the bird is dehydrated often they cannot absorb enough through oral means because of how the gut works at this point. A lactated ringer solution may be required. Also by the time most birds are presenting as ill you may be looking at being clinically anorexic... because they are quite small and illness and stress increases the metabolic rate, it can happen quite quickly.
While it's not a nice thing to think about, if you have any further budgies pass away it might be an idea to get them to your avian vet for necropsy (birdy autopsy) to see if they can determine the cause of death and shed any light on what might be going on. Your vet would be able to tell you what to do with the bird in that case before bringing it in and they will be able to wrap up your little one respectfully afterwards so they can be safely returned for burial or cremation if you wish as well. Here is hoping that all your other feathered friends all live very long, healthy lives and you never have to worry about this anymore though! It is very hard to loose them I know and the hard part about loving animals.