Recursive backtracking is a simple algorithm to generate a perfect maze.
A perfect maze means there are only one route to get from any one place of the maze to another.
Here is a demo I made in P5.js, entrance is on the top left, exit is on the bottom right.