Litecoin core wallet private key

Hello community
I had a litecoin core wallet on my laptop I’m trying to recover my litecoins I have the private key how can I recover the litecoins I’m downloading the core wallet again what step should I do to recover thanks for the help laptop is Mac

once you are done sycing the blockchain with the newest version…open console under the debug menu and then type:
importprivatekey (private key)

make sure to encrypt your wallet with a password and make a backup…DO NOT FORGET YOUR PASSWORD…YOU CANNOT RESET OR RECOVER YOUR PASSWORD EASILY…

if you have already set a password for the wallet prior to importing the new key…
you will need to unlock the wallet first before you can import a new key…

Dont forget to make a backup after you import the key and save it on a flash drive or something and do not loose it
or you can send your coins to an exchange once your wallet is finished importing the key as well

thanks for your help
so I downloaded lite coin core I’m trying to do what you wrote but its giving me this codenvalid private key encoding (code -5)

Method not found (code -32601)
anything else I should do thanks for your help