From initial planning to postoperative care, artificial intelligence (AI) is improving heart surgery at every step. Machine learning models that anticipate patient-specific risks, including mortality and sequelae, are used in the preoperative phase of AI for the purpose of risk assessment and stratification. These algorithms consistently outperform more conventional methods by sifting through massive datasets in search of hidden patterns. By combining various forms of data, AI enables personalised medicine by creating a thorough risk-benefit analysis that is specific to each patient. AI plays a crucial role in improving patient care during surgery by analysing intraoperative data in real-time, including electrocardiogram (ECG) rhythms and haemodynamic parameters.