I formated my hard drive with bitcoin core on it
Addresses are not magically tied to the hardware you use. If you delete the file that contains the private keys for your addresses, you will lose them and thus lose access to your Bitcoin.

Since it seems that you formatted your hard drive without making a backup of your wallet file, your private keys and thus your Bitcoin are lost. You may be able to recover the file using file recovery software such as Recuva.