Why doesn't my 'OnTriggerEnter2D' work?

I NEED HELP…

Collider and RigidBody2D are applied to the moving object 'cat'. I also checked the isTrigger of the collider object in the 'flag', which is the object that will collide. What’s the problem?

Even if the cat moves and reaches the flag, nothing appears in the console window. Editor version updated to 2022.3.10 a few days ago. I also use M1 Mac.
Thank you, brothers.

(my code)

void OnTriggerEnter2D(Collider2D other)
{
    Debug.Log("Goal");
    SceneManager.LoadScene("ClearScene");
}

If you want to replicate Unity’s example put OnTriggerEnter2D on the object with Collider2D only, not on the object with Collider2D and RigidBody2D, they also have Is Trigger checked on both.