The most common mistake is doing intense stretching right after a heavy workout, when your muscles are already micro-injured and inflamed. This can make pain and swelling worse. It's better to save stretching for later: either at the end of your workout as light, static stretching (no bouncing), or the next day when the acute inflammation subsides. Don't confuse stretching with recovery - they're different things.
From my own experience, after intense leg workouts, the main things are sleep, proper nutrition with enough protein, and time. Muscle soreness on days two or three (DOMS) is a natural adaptation process, and no amount of stretching will completely get rid of it. But what actually helps me is light activity the next day (walking, low-intensity cardio) and quality stretching of the calves, quads, and adductors after a warm-up. Heat works too - sauna or a hot shower.
If you want to minimize soreness in the future, focus on gradually increasing your training load instead of stretching. Your muscles adapt faster than you think, and after a couple of months the same workouts will recover much more easily. Do stretching for flexibility and joint health, not as a cure-all for pain.