Is there an easy way to create a corner from disconnected edges?
Supposing that you have all non-instanced cubes, with different grid size, etc... so you can't use any trick and you have to model by hand your corner, there are two operators that can may help you:


"Run the previous action" (Shift+R) with automatic merge enabled
Grid fill


I'll start by deleting the messed part and than pick one of the edge path by selecting two vertex (Crtl+RMB), extrude once by snapping to the vertex grid, repeat with Shift+R several times and complete with a grid fill with appropriate parameters.