Climate change is the long-term shift in weather patterns from the tropics to the polar regions. This global threat is starting to materialize and is putting pressure on many industries. This study aims to test and compare the performance of eight machine learning models in classifying sentiment related to climate change to find the most accurate and effective model. Thousands of people share their thoughts daily through tweets on the popular microblogging platform Twitter (X). Twitter (X) is a fantastic source for information about public opinion and perceived risks of problems. One of the hot topics being discussed on Twitter is climate change. Climate change is a well-known and rapidly growing topic of study in sentiment analysis in NLP and text classification. This study used LR, SVM, XGB, DT, RF, NB, KNN, and GBM algorithms to examine the issue of climate change. The dataset was obtained from Kaggle and grouped into four sentiment polarities: "News," "Pro," "Neutral," and "Anti," which were then divided into 80% training data and 20% testing data. SMOTE was used to handle imbalanced data in the sentiment polarity classes. With an accuracy of 73.92%, an F1-Score (Macro) of 0.645, and an F1-Score (Weighed) of 0.727, the SVM-Linear algorithm outperformed all algorithms used in the study. In conclusion, the BERT model provides the highest accuracy in classifying climate change-related sentiment compared to the other seven models. This implication provides a scientific basis for selecting the most accurate and efficient machine learning model for detecting public sentiment related to climate change, thus supporting more responsive environmental policymaking.