Transparent trait: Even when the cube is in plain sight, it takes a successful DC 15 Wisdom (Perception) check to spot a cube that has neither moved nor attacked. A creature that tries to enter the cube's space while unaware of the cube is surprised by the cube.
It's up to the DM
Whether or not to ask your players to do an active check or just use their passive is up to the DM to determine. The only direct answer is if the player says they are looking for something, in which case, you can have them do an active check for something they are actively doing.
Otherwise, using a passive score or asking for a player to do an active check is purely up to the DM and there is no direct rule regarding this.
Either way, monsters are also here to tell a story and not just be a bag of XP. It's okay for players to stumble into it, that's why it's in the stat block! But if you want to as DM, you can also try and provide some clues that something is amiss. If they ask you to do a check, then you can have them do a check.