How to make simple box, controlled by player to collide with walls?

I have a simple room with box colliders and player-controlled box. If I apply script to control it, no collision is working. Box just passing trough the walls. If I apply rigidBody to player - he collide, but I can`t move him on Y axis, due to mass. How to fix this issue?
The game is 2D.

Thank you for your time.

Try to make your player Gravity Scale to 0.

So the interact with the mass relative to the gravity will be null.