Oncologists determine the best targeted therapy for a patient by conducting genetic testing and molecular profiling of the tumor to identify specific genetic mutations and molecular markers. This information guides the selection of targeted therapies that are most likely to be effective based on the unique characteristics of the patient's cancer.