You’re trying to use an optional feature of Bitcoin Core: the ability to query for old transactions.
This functionality needs:
- (a) the full blockchain (where else would it get the transaction from)
- (b) an index by txid so it doesn’t need to read through 270 GB to find what you’re looking for.
The error message you get is telling you that this (b) index is not enabled. When you try to enable it, it fails because you don’t actually have the blockchain (a) in the first place (it’s pruned), so it can’t be indexed.
If you really need this functionality, you’ll need to disable pruning, start syncing from scratch (as it’ll need to download the blockchain again), and enable indexing.
However, you saying “tried to verify” perhaps highlights a misconception you have:
getrawtransaction doesn’t verify anything, it just retrieves the transaction in your local copy of the blockchain. Everything is already verified, even when it’s not kept on disk. Generally when you care about a particular transaction, it’s because it directly or indirectly affects your own funds, and the recommended solution for that is simply using good wallet software – it will only show you transactions that are verified and whose entire history is verified.