Washing laundry in laundry detergent does help somewhat to kill some germs and bacteria but not all bacteria or germs are killed using plain laundry detergent.
To kill more bacteria in laundry you can add some vinegar or even some apple cider vinegar to the laundry.
Or if your laundry is bleach safe you can kill a lot of germs and bacteria using a cup of bleach in your laundry.
Some other things that help to kill bacteria in your laundry is hydrogen peroxide or Borax in your laundry and use a hot water setting if it's safe for your clothes.
During the cold and flu season I will add some vinegar to my clothes and laundry to kill off some germs and I'll also add some hydrogen peroxide to the mix to help disinfect my clothes and laundry.
You can also use Lysol laundry sanitizer to help disinfect your clothes and other laundry.