Hi @San
Did Olaf's answer help you? I also found the following link, maybe you can use it as a reference: https://www.sqlshack.com/reporting-and-alerting-on-job-failure-in-sql-server/.
If the answer was helpful, please click Accept Answer so others with similar questions can find it quickly. Please feel free to let me know if you have any questions.
Best regards,
Aniya