Ask what the ingredient is doing before you replace it.
Name its job โ acid, fat, sweetness, thickening, structure, aroma, colour โ and substitute for the job. Something that matches on flavour but not on function will change the dish far more than the reverse.
Ingredients usually do more than one thing. Sugar sweetens, but it also holds moisture, softens texture and browns; egg flavours barely at all but binds, enriches and leavens; buttermilk adds acid that a chemical leavener may depend on. Swapping on taste alone is how a cake ends up flat and a sauce ends up thin.
Any absent ingredient, any dietary adaptation, any regional substitution.
Replacing an acid with something merely sour-tasting where a leavener needed the acid; swapping a fat that behaves differently at temperature; removing salt from a ferment or a cure, where it is doing the preserving.
Meridian cooking encyclopedia โ Watchman Productions