Tasting while in progress is trial and error and a learned skill. If a sauce needs to cook for an hour or more to meld favors together, it will not taste the same early in the process as the finished product. Some ingredients mellow during the process, others concentrate. Garlic as an example may taste strong to begin with, or be undetectable in other areas until it has melded with the other ingredients. Salt will often become stronger as the product cooks towards completion. The art is learning that at the half way mark knowing what the salt or other ingredient should taste like and how forward it should be to have it where you want in the finished product. If you cannot taste it at all at the half way point, there almost certainly is not enough, but if it tastes like what you want at the end, then you may have too much and need to make other adjustments.
For me, this comes only with experience and you will get that only by consistently tasting and learning what it tasted like in progress when it turns out the way you want in the end. You will definitely make mistakes, the key is remember and learn from those. In the long term, you final results will tend to be better if you go by taste in many products than trying to go by one pinch in this dish, two dashes in this, and so on. Meat is especially notorious for one piece taking more spice than another, but many vegetables are the same way, especially things like onions that can vary in strength, tomatoes that vary in acid, etc.
In learning on some dishes, like sauces, you can even consider dividing into two sauce pans. One you spice a bit heavier than he other, taste side by side, and proceed. Then compare the end product and see which was closer to what you wanted. If both are OK, but one better, you now have a better idea of what the mid point target was, combine them for serving so no loss and remember the lesson.