Almost every new patient tells me they have been stretching. Most of them have been stretching diligently, for months, and it has not helped. That is not because they did it wrong. It is because stretching was never the right tool for the job.
It does not prevent injury
Static stretching before activity has been studied more than almost anything else in sports medicine, and the results are consistent: it does not reduce injury rates. A warm-up that raises your heart rate and rehearses the movement does.
It does not fix a tight muscle that is protecting something
A hamstring that feels tight after every run is often not short at all. It is working overtime because something else, usually the hip or the trunk, is not doing its share. Stretch it and it feels better for twenty minutes. Strengthen the thing it is covering for and the tightness goes away.
It does not build the range you can actually use
Passive flexibility is the range someone else can push you into. Usable range is what you can control under load. The second one is what protects your back when you lift a suitcase, and you build it with strength work at the end of your range, not by holding a stretch.
Stretching is pleasant and there is nothing wrong with it. Just do not expect it to do the heavy lifting.
