Just this past week, I’ve spoken to 2 separate friends in the gym that have tweaked their hamstrings while exercising outside the gym. This can only be a result the training in the gym didn’t carry over to the activity. If the activity is putting an excessive load on your back and you feel you have done enough squats, leg press, and back exercises, then check the quad and hamstring balance. But I’d not suggest that method of training alone, for someone who runs wind sprints with their son’s football team. Train for the goal; specificity is so important.
Clear majority of muscle strains in the thigh occur in the hamstrings. Specifically, the upper portion due to the force of generation during (hip extension) accelerating on the field or court or treadmill, etc.
Incorporating hip extension movements (kettlebell swings, stiff leg deadlifts, good mornings, hip thrusts off the bench, etc.) into your program will aid in strengthening the upper hamstring (weakest link).
Of course, I prefer heavy kettlebell swings and hip extensions to target the upper hamstrings and overall hip extensor development because of the dynamic nature and eccentric loading. I helped introduce introduced kettlebell workouts and hip extensions as part of a biweekly staple to a College team and from one season to the next, their incidence of hamstring injuries in their running backs and defensive backs reduced significantly. Primarily due to the dynamic loading of the exercise onto the upper portion of the muscle group from hip extension action rather than flexing at the knee.
As a broad overview, ensure your program promotes equal strengthening/balance between anterior muscles and their posterior counterparts and is specific to your goal