Why doesn't my Sprite detect Mouse Down?

I watched a tutorial on how to make a Drag & Drop inventory screen and attempted to implement something similar for a project. For it to work, I needed the elements to be Sprites instead of UI elements.

public class DraggableItem : MonoBehaviour {
    private RectTransform rectTransform;
    private CanvasGroup canvasGroup;
    private SpriteRenderer spriteRenderer;
    private bool dragging = false;
    private void Awake()
    {
        rectTransform= GetComponent<RectTransform>();
        canvasGroup= GetComponent<CanvasGroup>();
        spriteRenderer = GetComponent<SpriteRenderer>();
        
    }

    public void Update()
    {
        if (dragging)
        {
            spriteRenderer.color = new Color(255,255,255,60);
            Vector2 mouseTransform = new Vector2(Input.mousePosition.x, Input.mousePosition.y),
                objTransform = Camera.main.ScreenToWorldPoint(mouseTransform);
            transform.position = objTransform;
        }
    }

    private void OnMouseDown()
    {
        dragging = true;
        Debug.Log("["+name+"]" + " Mouse Down");
    }
    public void OnMouseUp()
    {
        dragging = false;
        Debug.Log("[" + name + "]" + " Mouse Up");
    }

I have the code above implemented from a number of sources. The issue is that the objects with this script do not detect Mouse Down or Up at all, so the script doesn’t fire.
205135-hierarchy.png

This is the hierarchy of the objects I used. The Background object is an image I made, the SequenceGrid is a Sprite that arranges the Cell objects with a GridLayoutGroup, and the Block is the DraggableItem. All elements are Sprites.

(Note: I am aware the script doesn’t make the element opaque when dragging is over, I’m more focused on the core issue at the moment.)

As it turns out, the code that I posted is specifically for UI elements. UI Elements make contact with the mouse innately, but Sprites don’t necessarily do this since some are used purely cosmetically. The code below is a functioning version of Drag and Drop that I implemented in my project.

private void Awake()
    {
        rectTransform= GetComponent<RectTransform>();
        canvasGroup= GetComponent<CanvasGroup>();
        spriteRenderer = GetComponent<SpriteRenderer>();
        collider = GetComponent<BoxCollider2D>();
        dragging = false;
        transform.SetAsFirstSibling();
    }

    public void Update()
    {
        if (dragging)
        {
            mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            this.gameObject.transform.localPosition = new Vector3(mousePos.x,mousePos.y,0);
            Cursor.visible= false;
        }
    }

    private void OnMouseDown()
    {
        
        if (Input.GetMouseButtonDown(0)) {
            
            Debug.Log("[" + name + "]" + " Mouse Down");
            mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            dragging = true;
            parentHolder = transform.parent;
            transform.SetParent(null);
            

        }
        
    }
    public void OnMouseUp()
    {
        dragging = false;
        Transform destination = GetClosestObject("GamespaceCell").transform;
        Debug.Log("[" + name + "]" + " Mouse Up. Closest Cell is " + destination);
        parentHolder= destination;
        transform.SetParent(parentHolder);
        Cursor.visible= true;
        transform.SetAsFirstSibling();
        parentHolder.GetComponent<SequenceSlot>().Refresh();
        Debug.LogFormat("Item Dragged to {0}",parentHolder.GetComponent<SequenceSlot>().ToString());
    }

    public GameObject GetClosestObject(string tag)
    {
        GameObject[] matches = GameObject.FindGameObjectsWithTag(tag);
        GameObject closest = matches[0];
        foreach(GameObject go in matches)
        {
            if (Vector3.Distance(transform.position, go.transform.position) <=
                Vector3.Distance(transform.position,closest.transform.position))
            { 
                closest= go;
            }
        }
        return closest;
    }

Don’t mind the RectTransform, that is an artifact of experimentation.

A couple notes for this code that I found or that needs specifying:
The GetClosestObject method thats posted is generally very useful. It searches for objects that have the tag specified in the FindGameObjectsWithTag function. This is used to find the closest Grid space to the Draggable Item so that it can parent itself properly.
The ScreenToWorldPoint with the Input.mousePosition method literally turns the point of your mouse on your screen into a point in the gameworld relative to its position.
The reason why I set the Draggable Item to have no parent while being dragged is because a weird positional averaging. I can’t really describe it, but the Item will basically teleport to a point not correlating to your mouse. It will not follow your mouse exactly, though you will still be able to drag it.