Stretching on its own has a weak record for injury prevention. Strength training through full range, sensible load management, and good warm-ups have much stronger support. Flexibility helps mainly when a genuine range limitation is part of the problem.
Static stretching before activity has not shown a consistent protective effect, and it can temporarily reduce force and power output. Meanwhile, strength training and structured warm-up programmes show much clearer benefits, particularly for hamstring and knee injuries in running and cutting sports.
If a required position is genuinely unavailable to you, that is a real problem worth addressing. A catcher who cannot squat deeply or a swimmer who cannot reach overhead needs that range, and improving it is legitimate injury prevention. The distinction is between fixing a specific limitation and stretching everything on general principle.
Use dynamic mobility and progressive warm-up sets before training. Save longer static holds for after sessions or separate slots, where they do not interfere with performance.
Build strength through complete ranges of motion, increase training volume gradually, warm up properly, and sleep. Those four cover most of what is actually controllable. Stretching can sit alongside them for comfort and for specific range needs, but it is not the protective measure it is often presented as.
The wider argument is developed in Flexibility vs Mobility in Athletic Performance. Anyone returning from injury should follow the guidance of the clinician managing it.