Squats are the ultimate testosterone booster. As you know when you workout, you are increasing the testosterone levels in your body for a certain period of time. The more intense your workout, muscles used and metabolic demands of your body, the more testosterone is produced. The squat works your entire lower body, meaning a lot of muscles are being used therefore more testosterone is produced. In terms of intensity and metabolic demands, there is nothing to be said, squats are hard AF.
If you worked out the previous day the testosterone will not only go to your legs but also to the muscles that are in the recovery phase.
In conclusion, if you want to get the most out of any workout you should squat (and do leg days of course).