Chosen Solution

Are there steps I need to take to clean the machine?

Run a rinse cycle with a gallon or two of Vinegar poured into it.

Your washing machine’s drain pipe might have a partial clog that you might not have noticed before. A clog in the drain line will often produce an offensive odor that can resemble sewer gas because the bacteria can form on the organic matter likehair or soap will often produce a nasty smell. here’s a video on other solutions: https://www.youtube.com/watch?v=1X2vgob4