It is getting pretty ridiculous that in this modern age we are still arguing about the effectiveness of stretching. As a species we have been able to write down our findings for about 6 or 8 thousand years. And yet we are still deciding what is the best way to maintain ourselves in good condition.
Below is an article that says stretching is bad and then in the comments that follow the authors shares advice one how to improve range of motion in a complicated way that I basically reduced to using dynamic stretching.
I've had poor results from static stretching but no injuries from it. I've also had painful results from yoga classes that put you in a difficult static pose and then have you hold the pose through the pain.
For the past few years I've been doing some very basic Tai Chi warm up exercises that most anyone would call stretches. However these are done without stopping, so no static stretching in one position. Also these are done in a way so that the your full pain free range of motion is used. So if you have any perceived tightness you are going to far. After a few months of these warm up exercises or stretches my range of motion and my ability to walk and sit comfortably was greatly improved. So it may be that static stretching is bad, but other stretching is good.
https://philmaffetone.com/dangers-of-stretching/