It is generally recommended that individuals perform about 5 to 10 minutes of dynamic stretching before participating in physical activities. Dynamic stretching involves controlled movements that gradually increase in range of motion and intensity, which helps prepare the muscles and joints for exercise.
For static stretching, it's usually suggested to perform it after the activity, as it can temporarily decrease muscle strength and performance when done before strenuous exercise. However, if flexibility is a significant goal, static stretches can be integrated into a warm-up routine as long as they are not too intense. Always make sure to tailor your warm-up to the specific activities you plan to do.