What most people don't mention is that hand tension is more important than any visual trick. When you sew, you tend to unconsciously clench your fingers if you concentrate too hard on the line, and that pulls the thread and warps everything. Try to relax the hand holding the fabric; I know it sounds weird, but it works. It also helps a ton to use a needle finer than you think you need - a thick needle takes up more space in the fabric and is more likely to drift.
The other tip I never see: place the fabric on a hard, flat surface, not in the air. When you're sewing while holding everything in your hands, the fabric moves without you noticing. If you rest it on a table or a rigid tray, each stitch stays more controlled. And while you're at it, make smaller stitches than you think you need - short stitches are easier to keep straight because you have less distance where you can mess up. Practice this on scraps first, no pressure.