Vascular wilt in cucumber, caused by the soil-borne fungus Fusarium oxysporum f. sp. cucumerinum (Foc), is one of the major causes of yield loss in this crop worldwide. The disease is very difficult to control and understanding the molecular mechanisms of resistance is essential for the development of resistant cultivars. In this study, we used the Lasso Feature Selection (LASSO) algorithm on RNA-Seq data (accession number PRJNA916850) to identify key biomarkers associated with resistance or susceptibility to Foc. This method, by eliminating less important genes, provided a small and interpretable set of the most effective genes. Four key genes were identified: two negative regulators (LOC101215771 and LOC101209793) that enhance susceptibility, and two positive regulators (LOC101211117 and LOC101214807) that play a role in defense and resistance responses. The results showed that the combination of RNA sequencing and the Lasso algorithm is an effective and efficient tool for discovering biomarkers associated with plant diseases. The use of these genes in breeding programs will be a fundamental step in producing resistant varieties, reducing dependence on pesticides, ensuring sustainable yield, and ultimately enhancing food security.