bitcoin core – How can I get the whole info for a transaction whose outputs are spent?

If I understand the question correctly, what you’re looking for is a “txindex=1” in your ‘bitcoin.conf’. It allows you to run ‘getrawtransaction’ to recall transactions that don’t spend from your wallet/don’t pay to your wallet/are not in the mempool. Furthermore, it’s named “Index transactions by TXID”.