Resistance training can temporarily raise testosterone levels for 15–30 minutes post-exercise.[1][2] More importantly, it can benefit testosterone production in the long run by improving body composition and reducing insulin resistance.[1]
Overtraining, however, is counterproductive. Prolonged endurance exercise especially can cause your testosterone to drop.[3][4] Ensuring adequate recovery time will help you receive the full benefits of physical activity.