OnCollisionEnter2D() and OnCollisionExit2D() not working

Unity 6 (6000.0.34f1)

Whatever I try, nothing seems to work and nothing I searched put me on the way.

here’s my code :

private void OnCollisionEnter2D(Collision2D other)
    {
        other.transform.SetParent(platform);
        Debug.Log("collision " + other);
    }

private void OnCollisionExit2D(Collision2D other)
    {
        other.transform.SetParent(null);
    }

moving platform

Is the other collider also not a trigger? Neither can be a trigger for OnCollisionEnter2D to work.

they are not, due to ‘new user’ status, I cannot put other images but the test cube is the exact same and the player is not : dynamic, he uses gravity, etc