Cannot Trigger my Callout Menu

Hi, Unity newbie here. I wrote a script to trigger a callout menu I added to my game. I also added box colliders to both my character and gameobjects for the trigger. Rigidbody is added to the character too. But I still cannot trigger my callout menu. Please help, thanks a lot!
Also, after I added box colliders to the gameobjects, these items still cannot stop my character. If my character bounces on the gameobject, the gameobject will slow my character down, but if I keep pushing, the character will pass the gameobject. How should I solve this problem?

public class EnterCity : MonoBehaviour
{
    public GameObject EnterCityMenu;
    // Start is called before the first frame update
    void Start()
    {
            EnterCityMenu.SetActive(false);
    }
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.CompareTag("Player"))
            {
                EnterCityMenu.SetActive(true);
            }
    }
    void OnTriggerExit2D(Collider2D other)
    {
        if (other.CompareTag("Player"))
            {
                EnterCityMenu.SetActive(false);
            }

    }
}

Your code looks correct. Make sure you’ve added 2D physics to your objects, not 3D physics.

It depends on how your character’s movement is implemented. It’s possible that it’s moving the transform directly instead of using its physics API.

Could you tell me a bit more about it? Which class should I use for this? Thanks

Either the Rigidbody or Rigidbody2D classes, the components you use to give objects physics.

Thank you, also, should I use sprites or gameobjects for items acting as triggers? Does it matter?

What only matters are the requirements for OnCollisionEnter2D/Exit2D that are detailed in the documentation.