Rotate rigidbody with collider

I have a Rigidbody2D and a simple C# script that rotates it.

     rb.transform.Rotate(0,0,19);

However, polygon collider doesn’t rotate and I don’t know how to fix it. So my question is: how to rotate a rigidbody in a way that would also rotate a collider.

If the collider and the rigidbody are on the same gameobject then you can just rotate the gameobject and it will rotate both.