It is best to use special underwear soap to wash underwear, which can sterilize and rinse easily, and will not cause detergent residue.
After washing underwear, it is best to expose it to the sun, which can play a role in sterilization.