so I just did a fresh install of Sierra. Then it turned out the files are needed. I erased my drive with the fastest option and didn't installed anything on it yet except the os so I think most of the data should be recoverable. What's the best possible way to recover the erased data?
The first is to stop using the computer right away.
Then make a complete bit-for-bit backup copy of the disk. Either boot the Mac in Recovery and create the backup from there, or take out the disk and use a seperate computer to create the backup.
After you have cloned the drive, you should perform recovery attempts on the cloned copy only!
Usually this is doing using specialized data recovery software. Both free and paid programs exists for multiple platforms - you can use for example a free Linux system to recovery files from an OS X system - it doesn't have to be a Mac program.
The best software to use depends on how much you want to spend, what kind of files you're looking to recover and how your disk was formatted before you erased it. Specially which type of partition table did you have, which type of file system did you have - and was the disk encrypted.
If you disk was encrypted with File Vault you'll probably have a very hard time ever getting anything recovered.