If the sub-folders were children of the main folder, when you deleted the main folder, you also deleted all of its contents, namely the sub-folder children.
The good news is that Scrivener moves deleted items to its own Trash (usually at the bottom of the Binder). Take a look in there and restore the folders you need by dragging them back into the Draft folder and arranging them as you want.
If you have already deleted the Trash, you will need to recover a backup of the project (hope you’ve made regular backups).
Next to the trash icon, there should be a “disclosure triangle”. Click on that to show (i.e. ‘disclose’) the sub-folders and files in it. Click any of those to reveal the text content of any file there. You can drag those files individually, or select a parent folder to drag it and its children to another part of your binder.
Every folder should have a disclosure triangle, as in the image below. The Trash is a folder, so it should have the triangle.
Can’t be certain what the lines are without seeing them, but they are probably the separators used when documents are viewed in scrivenings mode. If you are seeing them when clicking on the Trash, it implies that there are files in the Trash. If you were trying to delete the lines in the main Editor, you might inadvertently have deleted your text as well (in which case you need to recover your content from a backup). The lines aren’t real physical lines; just onscreen lines placed between documents as visual signposts. They can be removed if you really want. Scrivener > Preferences > Formatting > Scrivenings > then place a tick in the box next to: Separate scrivenings with single line breaks.
3a. Try pressing ALT CMD S. This will force Scrivener to save the project and rebuild its indexes. Anything now in the Trash?
3b. Close the project, quit Scrivener, restart Scrivener, and reload the project. Joy?
3c. Quit Scrivener, turn the Mac off, reboot the Mac, try Scrivener again with the project. Joy?
3d. Recover a backup of the project and start again.
Another approach: you mention that if you click the back arrow it goes through the documents that you are looking for. A neat trick that could be used here is the View/Reveal in Binder menu command, which will scroll the binder sidebar and expand any folders necessary to highlight and “reveal” whatever you are looking at in the active editor. It works in other places as well (such as search results), but in this case if you can load something into the editor and do not know where that thing is in the project, that’s just the tool to use.