Collision reaction not working

I have tried to get a GameObject to destroy an item when touching, yet it just does not seem to work. I have on trigger disabled on all scripts.
code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerCollider : MonoBehaviour
{

    public void OnCollisionEnter2D(Collision2D collision)
    {
        Debug.Log("collision");
        
        if (collision.gameObject.CompareTag("enemy"))
        {
            Debug.Log("dead");
            Destroy(collision.gameObject);

        }

    }

Have you tried using OnTriggerEnter()? It can give better results; only problem is it needs one of the objects to have a character controller or rigidbody which can create performance problems.

One of the two objects need to have a RigidBody. The Rigidbody component must be added first, followed by the Collider component in the inspector window.