My new dishwasher is smelling like sewer
From the description, this sounds like one of my favorite topics - dishwasher air gaps/high loops. However, from the picture it looks like the dishwasher drain hose goes up high. But since I can't see it come down, and since I know that if it is NOT installed correctly you are likely to have a problem, here goes:

The dishwasher drain normally requires an air gap. Traditionally, this would be a hose up to a corner of the sink into a little plastic/metal gadget referred to as the air gap. This would literally provide an air gap as the water would come out of the hose and through the air back down into another hose which would connect to the disposal or to the sink trap. Many recent (now on the order of at least 20 years, but not sure how long) models allow for a high loop configuration. In this setup, the hose loops up as high as possible - preferably up to just underneath the counter - and then loops back down to output into the disposal or the sink trap. This effectively provides an air gap as the water can only come back up through the high loop and back into the dishwasher if the sink were to fill up to the same height, which would hopefully be an extremely rare event. Even in such a case, the water would still not backflow into the water main (which would be a real safety issue) unless the water input to the dishwasher were open at the same time (i.e., dishwasher starting a cycle). So it is safe &amp; effective and approved in many, but not all, areas.

There are two likely problems related to the high loop/air gap:

1 - The dishwasher hose is not mounted high enough - either installed incorrectly or was installed correctly but fell down. In this case any time the sink fills up even a little bit, or the disposal clogs a little so that it can't drain as fast as the dishwasher is trying to send out the waste water, dirty water can flow backwards into the dishwasher. Even if you can't see dirty water, this can cause quite a stink.

2 - The end of the dishwasher hose is going into the drain pipe after the trap. In this case, despite having the high hose, which provides an air gap to prevent backflow, sewer gas could go back through the hose to the dishwasher because it would not be blocked by the water in the trap.

If you can't figure this out, see if you can (a) get a picture of the highest point of the hose so we can see how high it is relative to the sink and (b) a picture of the hose where it attaches to the drain pipes. One or both of those may already be in the pictures you posted, but I can't tell because of the shadows.