Why is my two month old dishwasher exuding a terrible smell?
Modern water saving appliances seem to be prone to this. Usually using proper detergent keeps this in check. Since the smell goes away after a wash, it sounds like you are doing this. You might try a different detergent anyway. It may also be a plumbing issue if standing water is consistently left at the end of the cycle.

Unless you're on a septic tank, start a empty wash cycle and let it fill with water. As soon as the water starts circulating, add 1 cup of household liquid bleach. Use 1 pint white vinegar if on a septic tank. Close the door and let the water circulate for 10 seconds, then stop the cycle and let it sit for 1 hour. Restart and finish the cycle.

Clean the filter and screen with hot soapy water. This should get rid of the smell, but it will eventually return.

Clean the filter and screen on a regular basis, perhaps weekly. When the smell returns, redo the bleach treatment.