Object passes through some walls?

Hi I was starting to use unity again after about a year of using something else and I ran into a problem where the player was only colliding with certain sides of an object. For example it would only collide with the left or right side of a cube but on the other side of the walls the player would go through.

I’m using a capsule collider and rigid body for the player and a box collider for the box.

What am I doing wrong?

Actually I realized what I did wrong was that I checked the constraints on the x,y,z axis on the ridgebody. Thank you for your help!