@Malena Castro , By default, your Azure Subscription is not registered with all resource providers and because your Subscription is not registered with Microsoft.alertsmanagement resource provider, you're getting this error.
What you must do is manually register your subscription with a resource provider from the portal.
----------
Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.