It’s recommended that you should clean your washing machine either bi-weekly or once a month.
Clean the detergent drawer, door and seal with a specialist cleaner like Dettol Washing Machine Cleaner.
Then clean your machine as stated in your washing machine’s manual by running it at 60°C without any laundry.