There are generally two schools of thought with stretching in terms of how long you hold the stretch. There is the 30 second stretch and the 3 minute stretch. I come from the place of the longer stretch in increase range of motion and the 30 second stretch in terms of maintaining the increased stretch. I think the important thing to think about with a stretch is that it is not just the mechanical stretch of the muscle but also the aspect of allowing the nervous system to adjust to the increased length of the muscle. Someone once described a 3 minute stretch in 3 parts.
1)The first minute of the stretch, there is a bit of resistance or protective shortening of the muscle as you are taking the muscle a little further than where it is used to going so you wait for that first minute for the nervous system to feel comfortable with the lengthening of the muscle.
2)The second minute, the protective tightening of the muscle reduces allowing the muscle to begin to lengthen.
3)The third minute is the time that the muscle is left in the lengthened position to allow the nervous system to experience not just the muscle in the lengthened position but also the joint going into that position. An example is the hip joint and a hamstring stretch. The stretch is not just intended for the hamstring but also for all the deeper tissue surrounding the hip joint.
When people ask me if I prefer foam rolling vs stretching, I think that both have their place but for allowing a muscle to lengthen and increase the joint movement in that direction, I always advise the stretch.
I always like to think of a stretch as slow cooking. A more gentle stretch for a longer period of time. All we want with muscle/skeletal system is for the body to be able to move in the manner to which it is designed.