When you delete files and folders, they are still there, only marked empty. But when you reformat, you are doing a lot of overwriting and that makes it much more difficult to recover your data. The simple answer is to restore from backup but it sounds like you don’t have any backup data.
Do a search, as there are lots of disk recovery software. And there are companies that specialize in recovering lost data, too, but they don’t come cheap. Good luck.