instances executing at the same time(solved)

I trigger a method on one instance of a script and all the instances of the script execute at once?

I use it on 4 objects here is the code

using UnityEngine;

public class Pikup : MonoBehaviour {

    public GameObject pikup;
    public Camera Plar;
    public GameObject pickupic;
    public Item itemtobepickupt;

    void Update()
    {
        RaycastHit hit;
        if (Physics.Raycast(Plar.transform.position, Plar.transform.forward, out hit))
        {

            Pikup pikup = hit.transform.GetComponent<Pikup>();
            if (pikup != null)
            {
                pickupic.SetActive(true);
            }
            else
            {
                pickupic.SetActive(false);
            }

            if (pikup != null && Input.GetButtonDown("E")) {
                PickupItem();

            }
        }
    }

    void PickupItem ()
    {
       pickupic.SetActive(false);
       bool wasPickedUp = Invtorey.instancs.Add(itemtobepickupt); 

        if (wasPickedUp)
        Destroy(gameObject);
    }

}

thanks

Of course they execute all at once. To start with please, please for the love of us all read through manual: Unity - Manual: Unity User Manual 2021.3 (LTS)

Answer is very simple. You hit object with raycast, pikup is not null and you have E button clicked. Each of the objects that has the script does not care if it was the object that was hit, so all of them execute same code as all conditions are fulfilled. For all of the objects these conditions in if statement are true, so code executes.
If you want to detect collision i recommend using OnCollisionEnter instead as that code will only execute when something collides with your collider. For now you just send 4x rays each frame. Have raycasting on the player instead and handle colliders on objects.