In any case you must not do anything with your HDD/SSD to avoid the files be overwritten. You have to connect your Mac to another Mac and start your erased Mac in Target disk mode. Then you should use a drive/file recovery application installed on the other Mac to recover the erased drive.