so I have a Portable Hard Drive, (WD My Passport Ultra), and while i was using media creation tool I accidently used this hard drive as the location to put windows 10 on. I realized too late and saw that all my stuff had been deleted and replaced with the media creation tool files, I panicked and just deleted these files and removed the hard drive. Now my hard drive is not only empty but it says its only 35 gb. I want to know if there is anything I can do to recover any files from the hard drive. Is it possible the files are in the computer the hard drive was plugged into ? Please help me out.
There's a very slim chance there's still usable data on the drive, but the reality is that the partition table and filesystem maps - basically, everything that tells a computer what files exist and where each file lives - is completely gone. You'd have to run some sort of recovery tool on the drive and keep your fingers totally crossed that it could piece the data back together.
Why this is just a remote possibility is that you didn't just erase the "maps" to the data, you stored a bunch of new data on the drive as well. The computer basically reset the drive to an empty state and started creating files on it, without heed to any data that may have already been there. If it overwrote key parts of files — which is very likely — then there's already massive holes in the file contents which probably means the data, even if retrieved, will be unusable in that state.
As for why it thinks the drive is only 35gb now, that's likely because when it started creating the new media layout on it, it was creating a new filesystem that only used the capacity required to hold what the image required to hold all its contents. You're probably going to have to completely reformat the drive to use it again, which means recreating the partition table and filesystems so you can use the full capacity of the drive once more. That's going to make it even more likely that you wipe out the original data, but honestly, salvaging anything from the drive is a fairly forlorn hope right now anyway.