Bip32 bitcoin core wallet `hdseed` format from xprv master key
You simply cannot. The HD seed is used to derive the master private key, not the other way around. This derivation uses a hash function so it only works in one direction: HD seed to master private key. Given the master private key, you cannot get the HD seed used to produce it.

BIP 39 mnemonics are used to create a HD seed which is then used to create the master private key. However BIP 39 specifies that the HD seed be created using SHA512 (within PBKDF2) so it will always output a 512 bit seed. But Bitcoin Core cannot take 512 bit seeds, so you cannot use a BIP 39 mnemonic with Bitcoin Core at all.