Depending on the type, intensity, and duration – exercise can increase or decrease your testosterone.
Lifting weights increase testosterone, while too much cardio decreases it – as it increases cortisol and adrenalin, which then lower your testosterone.
Not overdoing it, and having periods of rest, and giving your body time to recover – will help your testosterone levels.
Try not to exercise in the evening, since this will affect your sleep. If you want to do some cardio, have a short walk in the morning, get some sunlight and spend some time outside.
If you want to optimize your testosterone levels naturally – try natural herbal supplements, which are safe and proven to work.