How to detect a game object with two box collider2D?

Hi there,
I’m making a 2D game with Unity.
I created a game object which have 2 collider2D (body and attack area)
when 2 of them move toward each other, I want the box collider2D only trigger when it’s attack area hit the others’ body.
How can I do this?

Thanks

You can use the, OnTriggerEnter(){} to check the collission or

OnCollissionEnter()