Fist of all, this is a very sensitive matter. If and when such thing happens you need to immediately pull the plug on power or make sure that the drive is stopped being written to.
Data is not really deleted unless it's overwritten by new data. Now if it's an OS drive the damage might be already done (there's still might be a chance) but if it was secondary drive and absolutely no data was written onto it, not even a single bit then it's 100% recoverable.
You don't need to buy any software for such recovery, free software like Recuva, Minitool data recovery, EaseUS data recovery can work. Just make sure no data is written onto the disk at all while you plug it onto a different computer or the same if it was a secondary drive.
Another important thing when you recover the data choose the restore location not to be in the same physical drive. Restore it into a different physical drive. This is to avoid overwriting deleted data which you're trying to recover while restoring. Many software block you from doing so but some don't.