I was using Safepal Wallet and moved my funds to Trust Wallet
The outcome might be affected by the method you used to move the funds. Generally there are three methods for non-custodial wallets - using a recovery phrase, importing keys and sweeping.
I can imagine that sweeping funds might mean that the wallet records the sweep transaction as the transaction in which you acquired those funds. Any dollar value might refer to an exchange rate at date of sweeping rather than at the date the previous wallet received the funds. This is speculation though.
It is also possible that the wallet uses todays exchange rate to show you the dollar value of the amount of Bitcoin in any transaction regardless of transaction date. This would be a problem created by the wallet's developers (and target audience) treating Bitcoin as a dollar payment system rather than a separate currency. In other words, selecting USD instead of BTC as the display units might be intended to give you an easily understood idea of current purchasing power, not of exact amounts of dollars exchanged (the dollar payment would be external to the Bitcoin network itself and not part of the Bitcoin transaction - which is only ever half of the real-world transaction)
the hash/[txid] links to a transaction where I received 5 BTC for around $250,000, but the original and true amount was around $30.
The Bitcoin blockchain and Bitcoin network carries no information about dollar exchange rates or about any other currency, goods or services being exchanged, purchased or sold in any transaction. You can't use blockchain records as receipts and not as tax-receipts. You probably shouldn't rely on your Bitcoin wallet to tell you anything about dollar values for IRS tax purposes unless the wallet was explicitly designed for that purpose and its developers warrants fitness for that specific purpose.