Should I close or open the washing machine door after washing?

Should the washing machine door be closed or opened after washing? This is a question of many users of both top-loading and front-loading washing machines because if closed, the steam will condense, leaving it for a long time will cause an unpleasant smell, and if opened, it is easy for cockroaches and mice to get in.