The significance of prenatal care is highlighted since effective maternal health care increases the probability of a successful pregnancy and a healthy baby. One of the most crucial aspects of pregnancy is the diagnosis of high risk pregnancy, which can be extremely beneficial to expectant mothers. Early diagnosis can also lower maternal mortality and morbidity. The goal of this study is to apply machine learning and deep learning algorithms to determine the risk level based on pregnancy risk factors. The analysis of risk factors in this study has been conducted using an existing dataset (Maternal Health Risk Data), and a comparison of various machine learning and deep learning algorithms reveals that the Gradient Boosting algorithm provides the highest accuracy in terms of risk level prediction, with an accuracy of 90.640%. Additionally, we have implemented Explainable AI (LIME and SHAP) to discover the exact explanation of the prediction that has been made.