Hello @user1289 ! Welcome to MetaMask community !
Under the hood of generating a private key is the BIP39 standard. You can see it briefly here: