how to create a maze with curved walls
If you just want thet two maze walls touching you could do this in object mode without the need to edit anything.

With a default scene resize the cube as required



when finished ctrla and reset all of the transforms



Turn on snapping and set snapping to vertex



Select the 3D cursor and snap as shown



with the cube selected rightclick and choose origin to 3D cursor



With the cube selected press shiftd to make a copy and immediately rightclick. This makes a copy and leaves it in place.

Select one of the cubes and F3 and type Mirror and choose the X axis





rz22.5 to rotate the object 22.5 degrees

and then the same with the other cube but use -22.5



You now have the shape and can copy and rotate as required.