Bitcoin core doesn’t see transaction
As pointed out by Peter in the comments of your question, you will need to wait until your node has synced with the longest chain. At the time of your comment, you are 169,245 blocks behind which, unless your transaction took place ~3 years ago, will not be known to your node yet. As soon as the block containing your transaction is verified by your node, you will be able to see the transaction.