Yes the heat from the dryer does kill bacteria as well as viruses.
So if you have clothing or other laundry that has viruses and bacteria on them the dryer will kill the bacteria and viruses on the clothing or laundry when you use the high heat setting.
The viruses such as the flu virus, cold virus etc cannot survive the high temperatures that a dryer operates at to dry the clothes.
Washing the clothes or laundry can also kill some of the bacteria and viruses but the heat of the dryer really does do most of the killing of the viruses on clothing and other laundry.
You can also wash clothes and other laundry in vinegar which also helps kill viruses and bacteria or if the clothes and laundry can safely be cleaned in bleach the bleach will also kill bacteria and viruses on clothing and laundry.
When you or someone or people in your house have the cold or flu viruses or is sick in other ways you should wash the sheets, pillowcases etc and then also disinfect doorknobs, phones, TV remotes, computer keyboards, computer mice etc.
That will help prevent the spread of viruses.