Check out example codes for "unity check if colliders are touching". It will help you in understanding the concepts better.

Code Example 1

public Collider2D objectCollider;
 public Collider2D anotherCollider;
 
 private void SomeMethod()
 {
     if (objectCollider.IsTouching(anotherCollider))
     {
         // Do something;
     }
 }

Learn ReactJs, React Native from akashmittal.com