Use
importdescriptors command followed by the descriptor containing your WIF private key with checksum and timestamp.
For example (
native SegWit):
importdescriptors "[{\"desc\": \"wpkh(privatekeyfromelextrum)#checksum\", \"timestamp\":0}]"
To get the correct checksum, use the command,
getdescriptorinfo.
For example:
getdescriptorinfo "wpkh(privatekeyfromelextrum)"
If your address is legacy from old version of Electrum, replace "
wpkh" with "
pkh".
The
importprivkey command will work if you create a non-descriptor wallet but Bitcoin Core will soon drop support for such wallet format
so it's better to learn those descriptor wallet-comaptible commands.