This works if you hang a script with an event on the collider. But what to do when there are a lot of hitboxes? Weigh in every collider script with catching events?
To determine what collider was hit you can use the hitCollider parameter. You will need to create a script that subscribes to the OnObjectImpact event.