After you try to find Zelda in Hyrule Castle, you are led to the Sanctum, where Phantom Ganon attacks.
Defeat Phantom Ganon
Phantom Ganon will summon copies of itself. It can swing its sword at you, or dash toward you and chop downward. It can raise the sword to its left (your right) and do a spin attack.
When you defeat a phantom, it drops weapons, such as a Gloom Sword that will deplete your strength if you wield it, and a Demon King's Bow.
After you defeat a phantom, another one may teleport close to you and attack, then it will focus its attacks on you.
After all are defeated, they reappear, and the middle one creates a puddle of Gloom. Attack the one that is creating the puddle to stop it. Do this whenever you see one creating a puddle of gloom.
When the enemy's health meter is about 33%, the Phantom Ganons will regroup, and they will be armed with heavy clubs. As before, stun the one that is creating a puddle of gloom. These Phantom Ganons will try to kick you, or they will jump and slam the floor with their weapons, or they will swing the weapons at you. They drop Gloom Clubs, which deplete your strength if you wield them.
When the enemy's health meter is about 25%, the Phantom Ganons will regroup once more, this time wielding spears. These Gloom Spears will also drain your health if you wield them.
After the battle, you can take the Heart Container that appears. You can also take the weapons if you wish.
Your next destination is Lookout Landing. Talk to Purah in Lookout Landing and there will be a cutscene.
Now that the Zelda in the castle was revealed to be an impostor, go to Kakariko Village and talk to Paya and Tauro. You can now investigate the floating ring ruin that the impostor Zelda forbid access to. This starts the quest Secret of the Ring Ruins.