Effective waste management is becoming a crucial component of sustainable urban development as smart technologies are used by smart cities more and more. Smart trash categorization systems provided by IoT may greatly enhance garbage sorting and recycling mechanisms. In this context, this work presents a waste categorization model based on transfer learning using the VGG16 model for feature extraction and a Random Forest classifier tuned by Cat Swarm Optimization (CSO). On a Kaggle garbage categorization dataset, the model outperformed conventional models like SVM, XGBoost, and logistic regression. With an accuracy of 85% and a high AUC of 0.85 the Random Forest model shows better performance in precision, recall, and F1-score as compared to standard machine learning models.