The washing machine is new and I use Rin detergent for the use and I don't know how do I get rid of these if it's happening only on using washing machine then?
It is possible that the stain is caused by a buildup of detergent residue in the washing machine. To prevent this, it is recommended to run an empty cycle with hot water and vinegar every few weeks. This will help to dissolve any buildup and reduce the likelihood of staining. Additionally, you may want to try using a different detergent or reducing the amount of detergent used in each cycle.