The emergence of the novel coronavirus (COVID-19) profoundly disrupted the field of education, ushering in an era of widespread online learning adoption. This research paper seeks to investigate the multifaceted factors influencing students' preferences for online learning. Employing data exploration techniques and machine learning algorithms, the study aimed to identify the pivotal variables affecting students' willingness and performance in online educational environments. The research encompassed data collection through designated questionnaires and the application of decision tree-based machine learning algorithms to analyze these diverse factors. Through this approach, seven specific prerequisites were derived, employing multiple linear regression analysis within the decision tree framework, to illuminate the relationships between these factors. Key aspects considered in these prerequisites included factors such as "internet connectivity issues," "COVID-19 pandemic-induced stress," "COVID-19 vaccination status," and "close relatives' COVID-19 infections". Foremost among the reasons for students' reluctance to embrace online learning was the presence of "internet difficulties," including issues like slow connections and frequent disruptions. From the results of this research, it can be concluded that basic computer and internet courses can be beneficial for encouraging online education. Findings of this study underscore the potential benefits of offering basic computer and internet courses as a means to encourage and facilitate effective online education, particularly in the context of the COVID-19 pandemic.