Is using something like circlecast from physics 2D the way or? Also, I prefer it to be 2D thing if using raycast is the solution, since my game is only 2d.
Or if you don’t need collision data you could use Distance equations that check all possible objects within a certain distance. And since you calculate distance from that first cube, the distance you check becomes the radius of the circle.
You can have a circle collider 2D on your object set to “trigger” then implement OnTriggerEnter or OnTriggerStay2D to detect object inside the radius, it should be working for your problem.
Edit : you can identify objects with their name, tags or many other ways.