the wall have mesh collider.
the character have capsule collider.
Try using RigidBody.MovePosition, like so:
RigidBody rb; // The rigidbody of the player. Use GetComponent to get the RigidBody of the player.
Vector3 mp; // The point you want to move to. This can be replaced with literally anything else.
rb.MovePosition(mp);
This way it all goes based on physics. Also keep in mind if either of the colliders are triggers they won’t collide, and if you are making a first person game, make sure the “near” part of the camera is set really low, that way you can’t see through the wall.