For something like this, you can capture the Windows event logs to a Log Analytics workspace and then query this service periodically for particular event IDs that you want to alert on.
You would have to write your own KQL query depending on your exact requirements. I would reference the articles below to get started:
https://learn.microsoft.com/en-us/azure/azure-monitor/agents/data-sources-windows-events
https://learn.microsoft.com/en-us/azure/azure-monitor/vm/monitor-virtual-machine-alerts