Physics queries include casts, overlaps, and checks in the Physics or Physics2D classes.
Test that a physics query hits an object by using a breakpoint or log.
Don't put breakpoints or logs after or inside other code when testing a method runs.
You likely have an error in your logic. Common mistakes include:
CompareTag to get proper warnings.gameObject, leading to the appearance that nothing happens.