user111586: I am trying to restore my Bitcoin Core wallet, but I only have the private key and passphrase, I don't have a wallet.dat file.
I tried using
importprivkey privatekey xxxxxxxxxxxxxxxxxxxx

which gave me the error Rescan is disabled when blocks are pruned (code -4).
How can I import the key?

user5406: Generally, the wallet shipped with Bitcoin Core only keeps copies of any transactions that directly involve the wallet. When you import a key, your node scans the entire blockchain to see if any transactions involved that key.
A pruned node has processed the whole blockchain, but only keeps the tail end of the data. This means that when you import a private key in a pruned node, the pruned node does not have the data to check for relevant transactions. That's why it is incompatible with the rescan requirement. To find the transactions related to the key, you will need to repeat the initial synchronization of the blockchain.
As Prayank already stated in his answer, you could use
importprivkey "<key>" "" false

to import one or multiple private keys. The "false" in the third argument skips the usual rescan triggered by the import. This should avoid the error you are seeing.
After you have imported all relevant keys, you restart your node with the -reindex commandline option to start over with the initial sync. Your wallet will scan for relevant transactions during the synchronization and rediscover the funds and transaction history of the wallet.
If you wish to avoid performing another synchronization with your node, you could instead import the key into a light-client such as Electrum as suggested by RedGrittyBrick in another answer.

111586: <p>I am trying to restore my Bitcoin Core wallet, but I only have the private key and passphrase, I don't have a <code>wallet.dat</code> file.</p>
<p>I tried using</p>
<pre><code>importprivkey privatekey xxxxxxxxxxxxxxxxxxxx
</code></pre>
<p>which gave me the error <code>Rescan is disabled when blocks are pruned (code -4)</code>.</p>
<p>How can I import the key?</p>
 5406: <p>Generally, the wallet shipped with Bitcoin Core only keeps copies of any transactions that directly involve the wallet. When you import a key, your node scans the entire blockchain to see if any transactions involved that key.</p>
<p>A pruned node has processed the whole blockchain, but only keeps the tail end of the data. This means that when you import a private key in a pruned node, the pruned node does not have the data to check for relevant transactions. That's why it is incompatible with the <code>rescan</code> requirement. To find the transactions related to the key, you will need to repeat the initial synchronization of the blockchain.</p>
<p>As <a href="https://bitcoin.stackexchange.com/a/99689/5406">Prayank already stated</a> in his answer, you could use</p>
<pre><code>importprivkey &quot;&lt;key&gt;&quot; &quot;&quot; false
</code></pre>
<p>to import one or multiple private keys. The &quot;false&quot; in the third argument skips the usual rescan triggered by the import. This should avoid the error you are seeing.</p>
<p>After you have imported all relevant keys, you restart your node with the <code>-reindex</code> commandline option to start over with the initial sync. Your wallet will scan for relevant transactions during the synchronization and rediscover the funds and transaction history of the wallet.</p>
<p>If you wish to avoid performing another synchronization with your node, you could instead import the key into a light-client such as Electrum as <a href="https://bitcoin.stackexchange.com/a/99682/5406">suggested by RedGrittyBrick</a> in another answer.</p>
