Vinegar is a two-stage fermentation, and almost every failure comes from treating it as one. First yeast turns sugar into alcohol, then acetic acid bacteria turn that alcohol into acid. The bacteria need oxygen, warmth, and a little patience, and they are far less fussy than the internet makes them sound. These are the techniques that actually decide whether your jar turns out sharp and clean or flat and mouldy.

Start with a live culture, not a clean slate
You can make vinegar from raw material and wild bacteria, but the reliable route is to add a live mother or a splash of unpasteurised vinegar from a previous batch. That gets the right organisms established before anything else moves in, and it shortens the wait considerably.
Use a jar that is wider than it is tall. The bacteria work at the surface, so a broad mouth gives them more area, and a narrow-necked bottle will turn a two-week job into a two-month one.
The food is alcohol and the engine is air
Acetic acid bacteria do not eat sugar; they eat alcohol. If you are starting from wine or cider, you are already there. If you are starting from fruit or sugar water, you must let the alcoholic ferment finish first, or you will end up with a sweet, cloudy liquid that spoils instead of acidifying.
Cover the jar with cloth, paper, or a loose lid. It needs oxygen, and it needs dust and fruit flies kept out. A tight lid stops the process entirely; an open jar invites a colony of flies and, eventually, a film of mould you cannot rescue.
A steady corner beats a warm one
A warm, dark corner is what the culture wants: somewhere in the range of a normal kitchen that is not next to a radiator or a draughty window. Steady beats warm, and a jar that swings between hot afternoons and cold nights will work slowly and unevenly.
Keep it out of direct sunlight. Light does not sterilise the jar, but it does encourage algae and it warms the liquid unevenly through the glass.
Bottle when the sharpness peaks
Start tasting after a couple of weeks. The liquid is ready when it smells sharply of vinegar and the sweetness or alcohol has gone; leaving it longer makes it harsher, not better. Pour it off through a cloth, leaving the mother and the sediment behind, and keep a cupful of the raw vinegar to start the next batch.
Bottle into clean glass and seal it. A little sediment may form in storage, which is normal. If a new mother grows on the surface of a bottled batch, the vinegar is still fine to use; it simply had air and something to work with.
Once you have run one jar from start to finish, the process stops feeling like a chemistry experiment. It becomes a jar in the cupboard that you feed occasionally and pour from when you need it.