Advancements in contactless vital sign monitoring are crucial for enhancing the accuracy of patient measurements and improving overall patient experiences. This research explores using a 24-GHz Frequency-Modulated Continuous-Wave (FMCW) radar combined with advanced signal processing techniques and the XGBoost machine learning algorithm for contactless respiratory rate (RR) measurement. This approach significantly improves over traditional contact-based methods by accurately detecting respiratory motion across diverse healthcare environments. The process, which includes signal collection, data cleaning, and feature extraction, is then analyzed using the XGBoost algorithm. The dataset, featuring varied respiratory rates from different subjects, supports comprehensive training and validation of the model, enhancing its accuracy and adaptability. The results confirm that XGBoost outperforms other models' accuracy and reliability, with notable reductions in error margins compared to SVR, kNN, RF, and GB. Specifically, XGBoost achieved the lowest Mean Absolute Error (MAE) of 0.67, Root Mean Squared Error (RMSE) of 1.00, and an accuracy of 96.13%, highlighting its superior predictive performance. This method's success in providing continuous, precise, and non-intrusive RR monitoring can significantly improve patient care standards, especially when traditional methods are unsuitable. Future research will focus on refining this technology's real-world application, evaluating its long-term reliability, and integrating it into existing healthcare systems to advance patient monitoring technologies further.