Cube is a 1997 Canadian independent science fiction horror film directed and co-written by Vincenzo Natali. A product of the Canadian Film Centre’s First Feature Project, Nicole de Boer, Nicky Guadagni, David Hewlett, Andrew Miller, Julian Richings, Wayne Robson, and Maurice Dean Wint star as individuals trapped in a bizarre and deadly labyrinth of cube-shaped rooms.
If this is the one where the rooms have various weird anomalies then I watched this one as a child and it was just so damn weird