This research focuses on investigating the buckling strength of thin-walled composite structures featuring various shapes of holes, laminates, and composite materials. A parametric study is conducted to optimize and identify the most suitable combination of material and structural parameters, ensuring the resilience of structure under both mechanical and thermal loads. Initially, a numerical approach employing the finite element method is used to design the C-section thin-walled composite structure. Later, various structural and material parameters like spacing ratio, opening ratio, hole shape, fiber orientation, and laminate sequence are systematically varied. Subsequently, simulation data from numerous cases are utilized to identify the best parameter combination using machine learning algorithms. Various ML techniques such as linear regression, lasso regression, decision tree, random forest, and gradient boosting are employed to assess their accuracy in comparison with finite element results. As a result, the simulation model showcases the variation in critical buckling load when altering the structural and material properties. Additionally, the machine learning models successfully predict the optimal critical buckling load under mechanical and thermal loading conditions. In summary, this paper delves into the study of the stability of C-section thin-walled composite structures with holes under mechanical and thermal loading conditions using finite element analysis and machine learning studies.