You need to check your filter and clean it out. Yes, especially if you've never done this and it's "fine". Find it and pull it out, I promise you. Do a hot, empty wash on the machine as well. You can add white vinegar to this, a sachet of "washing machine cleaner" (this is usually just citric acid) or just nothing. If it bubbles up during this hot wash, do another one. That's clearing all the old soap scum from your machine pipes.
In terms of washing detergent, I find the best combo is either Bold 2 in 1 powder and then add white vinegar as fabric softener, or you go full on chemical warfare and do pods (any, but Lenor are particularly good, and there are some cheap ones which are good as well, do trial and error) plus Lenor scent bead things, which are atrociously expensive and you need to use loads, so I only buy them when on offer, and don't add to every wash, only if I'm washing bedding or mostly tops. It feels like a bit of a waste to put them in with socks etc. Buy small packs of pods so you can change the scent regularly as it helps stop you going nose blind to it.
Then you must dry quickly. Don't leave washing in the machine after it's done. Move ASAP to dry outside, or put in tumble dryer.
Don't overfill washing machine. If anything still smells after washing, try "stripping" it - collect all these items up and wash them all together at 60 with no detergent at all or just plain powder. You'll find the same few things need this treatment periodically - I think it's certain fabrics.
Experiment with different washing programs. Some use more, some less water. I think this makes a real difference.
If you have hard water, using a few soda crystals in every wash is meant to help prevent limescale build up which keeps your machine working better.