Soap and hot water cause the fibers on the fabric to expand and release the trapped dirt and bacteria.

Im so glad I found this helpful video, I hope it can help others.

Wash and sterilize a cloth face mask

Use bleach and soap to sterilize a face mask

Wash face mask with hot water and bleach