Do I have to sell or can I move money to another stock without capital gains

Scenario: I want to move the money I have in NVIDIA to XRP - do I have to sell and then buy or can I transfer the money (thinking of capital gains tax)

Transferring the capital invested in one stock to another without selling is not possible.

You will have to liquidate or reduce your NVDA position in order to invest elsewhere.