How to Check If My Cursor Object (Not My Mouse) Overlaps with UI Object

I can already detect if my mouse was inside a UI object, but if the player uses a controller I need to check if my cursor object overlaps with some UI object…

I tried using RectTransformUtility.RectangleContainsScreenPoint but it doesn’t seem to work

void IsCoveredBy()
    {
        Vector3 cursorPos = RectTransformUtility.WorldToScreenPoint(Camera.main, CursorObj.instance.transform.position);
        bool detected = RectTransformUtility.RectangleContainsScreenPoint(GetComponent<RectTransform>(), cursorPos, cam);

        if (detected) Debug.Log("Occluded by rectTransform!");
    }

Well there’s not much to say to this. You have to find out why. First, sprinkle some Debug.Log() statements liberally through the code to find out, “Is this chunk of code even running?”

Then once it is, start printing out values. Print out the rectangle of that RectTransform, print out the coordinates your testing, figure out where everything really is mathematically.

I see
I thought its more about me using the code in a wrong way

This is my first time making a UI interaction with an object instead of mouse,
so correct me if I’m wrong, but what I need to do is to use:
WorldToScreenPoint on my cursor to check cursor position
Same thing with my UI objects
And then compare it manually right?