What happens if two handlers in the same play accidentally get the same name?
Handler names share one namespace per play, so only one of them runs: the last one loaded shadows the others.
Because notify finds a handler by name, two handlers called restart service are ambiguous. Ansible doesn't run both and doesn't report an error; the handler loaded last wins and the earlier ones can never be notified. That is easy to miss, since the playbook looks complete and one of the restarts silently never happens.
This usually happens when roles are combined, because handlers from roles and from the play's own handlers: section all land in the same play-level namespace. The defence is to give every handler a unique, descriptive name (restart httpd, restart mariadb) rather than a generic one.
Go deeper:
Naming handlers (official docs) โ the shadowing rule and the load order behind it.