It's not often that I'll prescribe stretching over mobility work unless I really need to. If I do, it will be at the end of a session when clients are cooling down. Hamstrings are notoriously tight muscles along the back of your upper legs, and while they respond well to static stretching, the benefits are often experienced in the short term.
Instead, try this three-minute hamstring-focused mobility flow to loosen up your muscles, improve blood and oxygen flow and strengthen joints.