You should see an option to upgrade to the Ultimate Edition from the main menu of the game.
If you do not then please make sure you have the latest game version installed. From the PS5 UI hover over the game icon click the three lines button then go-to information.
If you did not purchase a copy of the Ultimate Edition, the option to upgrade to the Ultimate Edition will only be visible on the main in-game menu when playing the game on PS5.
If you purchased a physical copy of the Ultimate Edition, do not use the purchase option, redeem the voucher code included in your game box.
If you have purchased the upgrade or redeemed your UE Voucher Code, you will not see the option.