I just started using Unity recently, and have created a simple platformer with a tilemap ground. After I added the TilemapCollider2D to my tiles, the player would randomly get stuck while moving. I searched online for suggestions, but they didn't help. I created a physics material with 0 friction and assigned it to my player's box collider, and set Default Contact Offset to 0.0001. Neither of these things helped.