If you want to increase your ROM in a movement, like squats, the most effective way is simply to do the exercise. Ironically, it's often the most ardent haters of isolation exercises that prescribe isolation stretches for this purpose.
However, contrary to stretching, resistance training can also increase muscle length. The key is to strengthen the muscle eccentrically in its lengthened position.
If someone has short hamstrings, doing good mornings or Romanian deadlifts is more effective than any possible amount of stretching.