I accidentally closed the layout I was working on
If I understand you correctly you fear your 3d work is lost. Rest assured, even if you remove a view in the interface, it doesn't affect your 3d scene.

All you need to do is resetting your "Layout" workspace. This is purely an interface thing and is irrelevant to the content. 

One way to reset your "Layout" workspace is pressing the plus(+)-button on the workspaces tabs and selecting General -> Layout. 

Alternatively you can open Blender, then select "File -> Open" from the top menu. Deactivate "Load UI" on the bottom left and then find and open your file.

This way any .blend will open with your startup Blender workspaces and interface settings.