Maze
You banish a creature that you can see within range into a labyrinthine demiplane. The target remains there for the duration or until it escapes the maze.
The target can take a Study action to try to escape. When it does so, it makes a DC 20 Intelligence (Investigation) check. If it succeeds, it escapes, and the spell ends.
When the spell ends, the target reappears in the space it left or, if that space is occupied, in the nearest unoccupied space.
Maze 5e 2024 vs. 2014 edition differences
The 2024 version allows the target to take a Study action to escape, requiring an Intelligence (Investigation) check, whereas the 2014 version uses a standard action with a DC 20 Intelligence check. The duration is "up to 10 minutes" in 2024, compared to exactly 10 minutes in 2014.