There is no best way - except to remove the causes that make their population explode.
How old is your tank? Most people get a diatom explosion within several months of setting up their tank. This often goes away on its own.
Excessive nutrients are the other main cause (particularly from phosphates). Are you using tap water? RO water is much better. This is what helped me. Otherwise many people use phosphate removers periodically.