every day, put on fresh socks (or at least every other day). If you don’t have time to do this, at the very least wash and completely dry your feet before putting on your shoes.
Never use the same pair of socks twice, especially if you didn’t wash them first! Your shoes will continue to smell until they are washed again since the bacteria from yesterday’s workout can survive in the fibres until they are cleaned.