why OnTriggerEnter is not work if with void Update

Hay…
i new comer. i have question i try a cube move headed for boxCollider but not something happen and debug not come out to consol, then among two of them have Rigidbody. Thanks in advance

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

public class Jalan : MonoBehaviour
{
    int speed = 4;
    public bool noSpeed;
    Rigidbody cubeRB;
    // Start is called before the first frame update
    void Start()
    {
        cubeRB = GetComponent<Rigidbody>();
    }

    // Update is called once per frame
    void Update()
    {
       if( noSpeed == false)
        {
            MoveCube();
        }

       
    }

    void OnTriggerEnter(Collider other)
    {
        if ((other.gameObject.CompareTag("BOXCOLLERD")) && noSpeed == true)
        {

            Debug.Log("Hiit");
            cubeRB.transform.position += Vector3.zero;
        }
    }

    void MoveCube()
    {
        cubeRB.transform.position += Vector3.right * speed * Time.deltaTime;
    }
}

You can’t move a rigidbody using transform.

If you want a collision, you need to use AddForce in the direction you want it to move.

Possible problems:

Cube doesn’t have a collider component

You’re not moving rigidbodies the way they are meant to be moved – with rigidbody.velocity or rigidbody.AddForce(…)