Not knowing any more information than you give above, it’s tough to make specific recommendations so I’ll start with the general ones. Whenever you suspect VA (volatile acidity, or the production of vinegar) in your wine, make sure you’re protecting against the most obvious enemies of newly-aging wine: Oxygen and spoilage microbes.
The first thing to make sure you’ve done is to keep your wine completely topped up, i.e. your containers completely full to exclude oxygen and to minimize the area in which aerophilic and microaerophilic (oxygen-loving) organisms can grow. The next thing you need to do is to make sure that your wine is being stored with enough added sulfur dioxide, or SO2. Sulfur dioxide is a compound that’s been used as an antioxidant for thousands of years and these days is usually added to wine in the form of potassium metabisulfite powder (often abbreviated as KMBS) or tablets. I like to store my wines with Free SO2’s between 28-30 ppm (mg/L).
A little quickie test I sometimes run when I suspect I have a VA or aldehyde problem (aldehydes can smell like nail polish remover instead of vinegar) is to take a sample of my wine, about 100 mL, and divide it between two glasses. Sprinkle in a good pinch of KMBS powder into one of them and swirl, then smell both after about 5 minutes. If the aroma improves with the SO2 addition, it indicates that low SO2 is part of your problem and that aldehydes are part of the issue. This is a clue that you need to add more SO2 to your wine when you store it. A vinegar smell itself (acetic acid) won’t go away with this test, but it still can give you a clue that you’re not sufficiently protecting your wine from O2.
Make sure that your vessels are completely topped up, completely sealed and that you’ve got enough SO2 in the wine. If you still have problems at the second racking (or when you top up every month, in case you’ve got wine in barrels), you may want to send a sample of your wine out to a commercial laboratory for a VA analysis. Many winemakers track their VA’s every month or three in order to track issues. This can get expensive but depending on the scope of your problem and the volume of wine you are trying to care for, can pay for itself in good, actionable information.